Skip to content

Conversation

hifi
Copy link
Contributor

@hifi hifi commented Dec 27, 2016

Flushing PipeStream when the other end has been closed causes a deadlock and it doesn't make much sense given the closed state.

This commit allows streaming execs to successfully end after closing the output stream on client side.

Simple test case that should not fail when streams are closed on client side:

var ssh = new SshClient(...);
ssh.Connect();
var cmd = ssh.CreateCommand("cat");
var async = cmd.BeginExecute("test", null, null);
cmd.OutputStream.Close();
cmd.ExtendedOutputStream.Close();
cmd.EndExecute(async); // will hang
ssh.Disconnect();

Flushing PipeStream when the other end has been closed causes a
deadlock and it doesn't make much sense given the closed state.
@hifi
Copy link
Contributor Author

hifi commented Dec 28, 2016

Closing in favor of #144.

@hifi hifi closed this Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant