diff --git a/srtcore/api.cpp b/srtcore/api.cpp index bb5dd64fe..ddae607da 100644 --- a/srtcore/api.cpp +++ b/srtcore/api.cpp @@ -236,10 +236,10 @@ string srt::CUDTUnited::CONID(SRTSOCKET sock) int srt::CUDTUnited::startup() { ScopedLock gcinit(m_InitLock); - if (m_bGCStatus) + if (m_iInstanceCount++ > 0) return 1; - if (m_iInstanceCount++ > 0) + if (m_bGCStatus) return 1; // Global initialization code