-
Notifications
You must be signed in to change notification settings - Fork 2
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: improve connection handling #22
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-gossip/pr/22/docs/iroh_gossip/ Last updated: 2024-12-12T05:30:05Z |
tested using deltachat's full workflow in
|
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.
code wise this looks good to me, but I am not deeply enough read into the gossip network code to understand if this is the "right" way to fix the issue. given the regression tests pass now, I trust you though
Description
Progress towards better connection handling. Until #13 subscriptions were kept around for the duration of the run even when no longer needed. As a consequence, a notable chunk of code never ran that affects ending and accepting connections, with quick re-connection being a pain point. This PR tries to improve connection handling, but I don't think this is the end of the issues.
Changes are:
close
the connection when the proto state machine indicates to disconnect the peer. The effect of doing this is that all the (per-topic)Disconnect
messages were never sent to the peer. This is what made the other node not realize we were gone and instead rely on timeouts.Join
, which were before the lost to the abyssBreaking Changes
n/a
Notes & open questions
I believe this is better than before. I also believe there are more related issues lurking.
The connection loop currently ignores errors on the receiving side. This is "justified" by arguing errors on the receiving side should appear on the sender side as well. This is weak argument but at this point I'm unsure what to do with it. Incremental improvement I guess?
Change checklist