Просмотр исходного кода

Handle Event Handle leak per issue #1761

olegkap_cp 12 лет назад
Родитель
Сommit
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._channelClosedWaitHandle.Set();
+                if (this._channelClosedWaitHandle != null)
+                    this._channelClosedWaitHandle.Set();
             }
         }