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

Issue #822 - Allow channel._handle_close to bypass session rekey block #833

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tsellers-r7
Copy link

This PR attempts to address Issue #822 opened by @mathrick

The change adds an argument to transport._send_user_message that allows the message to be sent during key negotiation. channel._handle_close is modified to set this argument to True to enable the closure of a channel even after a rekey has been requested by the client. Normally this closure message (cMSG_CHANNEL_CLOSE) would be blocked in transport._send_user_message until after the rekey process has completed. In some cases, as demonstrated in Issue #822, this never occurs and the connection errors out.

After implementing this change the demo code in Issue #822 was able to run for at least 700 loop iterations. Prior to the change the best I was able to achieve was 4 iterations before hitting the issue.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 74.241% when pulling bb29a8c on tsellers-r7:close_channel_vs_rekey into 7366f96 on paramiko:master.

@coveralls
Copy link

coveralls commented Oct 25, 2016

Coverage Status

Coverage increased (+0.05%) to 74.254% when pulling bb29a8c on tsellers-r7:close_channel_vs_rekey into 7366f96 on paramiko:master.

@bitprophet
Copy link
Member

Added the parent issue to a release milestone now that there's a patch. Looks good at a glance but I need to do my usual local repro / grok step sometime. Thanks!

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.

3 participants