diff --git a/RtspServer/ClientSession.cs b/RtspServer/ClientSession.cs index f706269a..d2e2a37e 100644 --- a/RtspServer/ClientSession.cs +++ b/RtspServer/ClientSession.cs @@ -45,6 +45,7 @@ The above copyright notice and this permission notice shall be included in all c using Media.Rtcp; using Media.Rtsp.Server.MediaTypes; using System.Threading; +using Media.Common.Extensions.Socket; namespace Media.Rtsp//.Server { @@ -469,7 +470,7 @@ public void SendRtspData(byte[] data, int offset, int length, SocketFlags flags if (ex is SocketException se) m_Server.HandleClientSocketException(se, this); //if not disposed mark disconnected - IsDisconnected = m_RtspSocket is null || IsDisposed || HasRuningServer is false; + IsDisconnected = m_RtspSocket.IsNullOrDisposed() || IsDisposed || HasRuningServer is false; } } }