mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-10-29 07:07:02 +08:00
Dereference socket instance field before disposing it.
This commit is contained in:
@@ -263,10 +263,11 @@ namespace Renci.SshNet.Channels
|
||||
{
|
||||
lock (_socketLock)
|
||||
{
|
||||
if (_socket != null)
|
||||
var socket = _socket;
|
||||
if (socket != null)
|
||||
{
|
||||
_socket.Dispose();
|
||||
_socket = null;
|
||||
socket.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user