Dereference socket instance field before disposing it.

This commit is contained in:
drieseng
2016-09-18 11:16:44 +02:00
parent 3e0100272c
commit 97ed0ddb1c
@@ -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();
}
}
}