浏览代码

Add comment.

drieseng 9 年之前
父节点
当前提交
1bab13b78d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/Renci.SshNet/Session.cs

+ 4 - 0
src/Renci.SshNet/Session.cs

@@ -1868,6 +1868,10 @@ namespace Renci.SshNet
                             {
                                 // interrupt any pending reads; should be done outside of socket read lock as we
                                 // actually want shutdown the socket to make sure blocking reads are interrupted
+                                //
+                                // 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);
 
 #if FEATURE_SOCKET_POLL