浏览代码

Handle Event Handle leak per issue #1761

olegkap_cp 12 年之前
父节点
当前提交
af3fc6b404
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Renci.SshClient/Renci.SshNet/Channels/Channel.cs

+ 2 - 1
Renci.SshClient/Renci.SshNet/Channels/Channel.cs

@@ -617,7 +617,8 @@ namespace Renci.SshNet.Channels
             {
             {
                 this.OnClose();
                 this.OnClose();
 
 
-                this._channelClosedWaitHandle.Set();
+                if (this._channelClosedWaitHandle != null)
+                    this._channelClosedWaitHandle.Set();
             }
             }
         }
         }