-
Notifications
You must be signed in to change notification settings - Fork 19
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
Gracefully disconnect connections and trigger events #6
Conversation
80b0fc5
to
57d9f99
Compare
…t; gracefully shutdown connections
57d9f99
to
eb0b350
Compare
…essage::ClientLostConnection immediately on a send failure
…ending messages, send InternalAsyncMessage::LostConnection immediately on a send failure and only emit ConnectionLostEvent once
I did indeed leave the disconnection/close behavior into a quick and dirty grey territory until now. It's good that you looked into it and it made me took a closer look too. Here are my thoughts about it: Desired behaviors :
We are still missing a few bits so I proposed additional changes to your PR to fulfill those:
Thanks a lot for your work ! Feel free to review the additional changes I propose. I'll wait for your opinion to merge those. Minors:
Possible future tweaks:
|
Thanks for taking a holistic look at the issue and fixing up the PR. I agree with the desired behaviors.
I agree. This is how quinn names it though: https://docs.rs/quinn/latest/quinn/struct.Connection.html#method.closed
I was debating this, but couldn't convince myself whether or not it was needed. Thanks for pointing out that One question I'm still unsure about: I noticed that this is problematic if one relies on the |
As of now, connections are indeed kind of a dead weight once I was thinking that I might add a |
Two somewhat related fixes in this PR:
ConnectionLostEvent
s.