Repository navigation
Retry Linux connections promptly after network recovery or resume - #45
Merged
Merged
Conversation
Wake shared reconnect backoff on GIO connectivity hints and login1 resume signals, without requiring NetworkManager. Retain a one-second attempt floor, ordinary command pacing and continued-failure backoff. Cover interrupted waits and real netlink recovery in isolated tests, and document the Linux recovery behavior and platform limits. Co-Authored-By: GPT-6 <noreply@openai.com>
itz4blitz
approved these changes
Oct 18, 2026
itz4blitz
left a comment
Owner
There was a problem hiding this comment.
Linux reconnect waits now wake on GIO network-available and login1 resume, reset backoff, and still keep a one-second floor so hint bursts cannot storm. Hints do not mark an account connected, close a healthy socket, or revive an expired session. The Windows failure was a_call_that_moves_to_another_voice_server_keeps_its_devices_and_goes_on seeing 5 packets instead of 15; that test is in mediad and this branch does not touch it. A rerun of the failed job passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After suspend or a local network outage, chatd could remain offline for minutes even after networking returned: shared reconnect backoff grew to 15 minutes and no recovery event interrupted the wait.
On Linux, wake that wait on GIO network-availability/configuration hints or login1 resume signals, reset accumulated backoff, and retry promptly. GIO supports netlink without NetworkManager. A single GLib event thread serves all accounts; the added Linux-only Rust dependency already exists in the lockfile.
Recovery hints remain hints: they do not mark accounts Connected, close healthy connections, revive expired sessions, or bypass ordinary HTTP/command pacing. Attempts stay at least one second apart, including event bursts, and continued failures still back off. Other platforms retain timed reconnection; remote DNS/service recovery with no local OS event is not detected by this change.
Includes
docs/reconnecting.mdwith behavior, limitations, restart instructions, and repeatable tests.Validation:
Fixes #41. The Discord viewport-reconciliation findings in #42/#43 and subscription-budget finding in #44 are separate.