-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix channel close procedure when the peer dies or our handler goes down #9103
base: maint
Are you sure you want to change the base?
Conversation
CT Test Results 2 files 29 suites 18m 23s ⏱️ Results for commit 557de4f. ♻️ 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. |
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.
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. |
%% Here we first collect the list of channel id's handled by the process | ||
%% Do NOT remove them from the cache - they are not closed yet! | ||
Channels = ssh_client_channel:cache_foldl( | ||
fun(#channel{user=U} = Channel, Acc) when U == ChannelPid -> |
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.
previously this fun deleted the channel cache. now we are just sending channel close to peer.
I assume if peer responds with channel close we will delete entry from cache.
what if the peer does not reply? idle_time
timeout will not handle that AFAIK.
what do you think about it? shouldn't they be removed after some timeout?
Fix proposal for the issue #9102