Apply patch 14803

This commit is contained in:
olegkap_cp
2013-07-10 14:09:21 +00:00
parent 9848c741eb
commit c7d162111b
@@ -531,22 +531,26 @@ namespace Renci.SshNet.Channels
{
this.OnDisconnected();
// If objected is disposed or being disposed don't handle this event
// If object is disposed or being disposed don't handle this event
if (this._isDisposed)
return;
this._disconnectedWaitHandle.Set();
EventWaitHandle disconnectedWaitHandle = this._disconnectedWaitHandle;
if (disconnectedWaitHandle != null)
disconnectedWaitHandle.Set();
}
private void Session_ErrorOccured(object sender, ExceptionEventArgs e)
{
this.OnErrorOccured(e.Exception);
// If objected is disposed or being disposed don't handle this event
// If object is disposed or being disposed don't handle this event
if (this._isDisposed)
return;
this._errorOccuredWaitHandle.Set();
EventWaitHandle errorOccuredWaitHandle = this._errorOccuredWaitHandle;
if (errorOccuredWaitHandle != null)
errorOccuredWaitHandle.Set();
}
#region Channel message event handlers