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

deadlock when disconnecting dynamic session #524

Closed
shipa988 opened this issue Nov 22, 2022 · 0 comments · Fixed by #523
Closed

deadlock when disconnecting dynamic session #524

shipa988 opened this issue Nov 22, 2022 · 0 comments · Fixed by #523

Comments

@shipa988
Copy link

shipa988 commented Nov 22, 2022

this kind of writing in channel makes deadlock possibility!

s.stateTimer = internal.NewEventTimer(func() { s.sessionEvent <- internal.NeedHeartbeat })

Possible deadlock occurs in dynamic session closing because line

case evt := <-s.sessionEvent:

is the only reader from channel s.sessionEvent, and after ending of loop

for !s.Stopped() {
no one can read from channel s.sessionEvent

PR #523

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 a pull request may close this issue.

1 participant