Skip to content

Commit

Permalink
Update srtcore/api.cpp
Browse files Browse the repository at this point in the history
merge if's together

Co-authored-by: Sektor van Skijlen <[email protected]>
  • Loading branch information
mbechard and ethouris authored Feb 4, 2025
1 parent 9658714 commit c73da53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ int srt::CUDTUnited::cleanup(bool force)
// executing this procedure.
ScopedLock gcinit(m_InitLock);

if (!force)
if (!force && (m_iInstanceCount == 0 || --m_iInstanceCount > 0))
{
if (m_iInstanceCount == 0 || --m_iInstanceCount > 0)
// [reinstate in 1.6.0] return m_iInstanceCount;
return 0;
}
Expand Down

0 comments on commit c73da53

Please sign in to comment.