Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel_Closed in ShellStream #44

Closed
trebor-salim opened this issue Jul 21, 2016 · 1 comment · Fixed by #1332
Closed

Channel_Closed in ShellStream #44

trebor-salim opened this issue Jul 21, 2016 · 1 comment · Fixed by #1332
Milestone

Comments

@trebor-salim
Copy link
Contributor

Are you planning to add an event "Closed" in the class "ShellStream"?

Something like this:

public event EventHandler Closed;

public override void Close()
{
if (_channel != null)
_channel.Close();
base.Close();
}

private void Channel_Closed(object sender, ChannelEventArgs e)
{
if (Closed != null)
{
// Handle event on different thread
ExecuteThread(() => Closed(this, new EventArgs()));
}
}

instead of this:

private void Channel_Closed(object sender, ChannelEventArgs e)
{
// TODO: Do we need to call dispose here ??
Dispose();
}

@drieseng drieseng added this to the 2016.1.0 milestone Jul 31, 2016
@drieseng drieseng modified the milestones: 2017.0.0, 2016.1.0 Dec 7, 2016
arition pushed a commit to arition/SSH.NET that referenced this issue Nov 15, 2018
Fixing race condition issues, externalizing dependencies, adding per-host keepalive
@drieseng drieseng removed this from the 2017.0.0 milestone Mar 5, 2020
@drieseng drieseng added this to the 2020.0.0-beta2 milestone Jun 28, 2020
@drieseng drieseng modified the milestones: 2020.0.0, 2020.1.0 Dec 31, 2020
@glenkleidon
Copy link

OK, I have done this work for my own project.

https://github.com/glenkleidon/SSH.NET/tree/bugfix/ShellStream_stopping_event_on_chanell_close

It is pull request #1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants