mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 17:25:51 +00:00
Fix for channel session semaphore from thread blocking (#1071)
* Merging fix from @clivetong into our own SSH.NET fork - The following article describes some of the issues with the double check lock that we have seen issues with: https://www.sudhanshutheone.com/posts/double-check-lock-csharp * Merging fix from @clivetong into our own SSH.NET fork - The following article describes some of the issues with the double check lock that we have seen issues with: https://www.sudhanshutheone.com/posts/double-check-lock-csharp * Update Channel to fix AppVeyor failure (field should be readonly)
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Renci.SshNet.Channels
|
||||
private uint? _remoteWindowSize;
|
||||
private uint? _remoteChannelNumber;
|
||||
private uint? _remotePacketSize;
|
||||
private ISession _session;
|
||||
private readonly ISession _session;
|
||||
private bool _isDisposed;
|
||||
|
||||
/// <summary>
|
||||
@@ -834,7 +834,6 @@ namespace Renci.SshNet.Channels
|
||||
var session = _session;
|
||||
if (session != null)
|
||||
{
|
||||
_session = null;
|
||||
session.ChannelWindowAdjustReceived -= OnChannelWindowAdjust;
|
||||
session.ChannelDataReceived -= OnChannelData;
|
||||
session.ChannelExtendedDataReceived -= OnChannelExtendedData;
|
||||
|
||||
Reference in New Issue
Block a user