diff --git a/src/Renci.SshNet/Session.cs b/src/Renci.SshNet/Session.cs index 0748b8dac..a542e2c3c 100644 --- a/src/Renci.SshNet/Session.cs +++ b/src/Renci.SshNet/Session.cs @@ -1770,7 +1770,7 @@ private void SocketDisconnectAndDispose() // This may result in a SocketException (eg. An existing connection was forcibly // closed by the remote host) which we'll log and ignore as it means the socket // was already shut down. - _socket.Shutdown(SocketShutdown.Send); + _socket.Shutdown(SocketShutdown.Both); } catch (SocketException ex) {