-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix channel close procedure when the peer dies or our handler goes down #9103
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
Conversation
CT Test Results 2 files 29 suites 20m 14s ⏱️ For more details on these failures, see this check. Results for commit 7eca95a. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
There is possibility to get a crash if the channel handler goes down before receiving 'channel-open-confirmation' from the peer. I have an update to fix that but need some time to make a test. |
What is expected from me? I don't see any comments, have I missed something? |
You wrote:
I thought you want to add some testcase code ... |
The test is updated by the latest commit. |
Account for the case when user channel handler goes down before the channel opening procedure is completed: if channel open confirmation is received for such channel - the channel is automatically closed. Add a test for such scenario.
557de4f
to
704973a
Compare
If the peer fails to respond to ssh_msg_channel_close the corresponding channel entry will be removed from cache after the timeout (assuming the connection is still alive with probably other channels open).
704973a
to
ca10880
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR and digging into this problem!
Please check comments inline.
ct:log("~p:~p open incomplete channel done - should not have happened",[?MODULE,?LINE]), | ||
Parent ! {self(), {fail, "Unexpected channel success"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those 2 lines a dead code? if so, maybe replace them with code comment?
PR is merged to maint, master branches. Thanks for contribution! |
Fix proposal for the issue #9102