We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0330bbc commit 9397839Copy full SHA for 9397839
1 file changed
src/SharpRTSPClient/RTSPClient.cs
@@ -497,9 +497,9 @@ private void StopClient()
497
}
498
499
// Drop the RTSP session
500
- if (_rtspClient != null)
+ var rtspClient = _rtspClient;
501
+ if (rtspClient != null)
502
{
- var rtspClient = _rtspClient;
503
rtspClient.MessageReceived -= RtspMessageReceived;
504
rtspClient.Stop();
505
_rtspClient = null;
@@ -1351,10 +1351,6 @@ protected virtual void Dispose(bool disposing)
1351
if (disposing)
1352
1353
StopClient();
1354
-
1355
- _rtspClient?.Dispose();
1356
- _videoRtpTransport?.Dispose();
1357
- _audioRtpTransport?.Dispose();
1358
1359
1360
_disposedValue = true;
0 commit comments