Skip to content

Commit

Permalink
Fixed Dispose call on sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackGad committed Jun 1, 2024
1 parent e9fbd51 commit 33a150c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions srtcore/srt.i
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ public readonly struct SRTSOCKET : IDisposable
SRTSOCKET(int value) => _value = value;
public void Dispose()
{
if(IsCreated) return;
if(!IsCreated) return;

srt.srt_close(_value);
// Remove any kept delegate pointers associated with an socket
Expand Down Expand Up @@ -1144,7 +1144,7 @@ public readonly struct SYSSOCKET : IDisposable
SYSSOCKET(int value) => _value = value;
public void Dispose()
{
if(IsCreated) return;
if(!IsCreated) return;
}
public override string ToString() => $"{_value}";
public static implicit operator SYSSOCKET(int b) => new SYSSOCKET(b);
Expand Down Expand Up @@ -1175,7 +1175,7 @@ public readonly struct EPOLL : IDisposable
EPOLL(int value) => _value = value;
public void Dispose()
{
if(IsCreated) return;
if(!IsCreated) return;
srt.srt_epoll_release(_value);
}
Expand Down

0 comments on commit 33a150c

Please sign in to comment.