Skip to content

Check every source for timeouts when announce_timeout is set - #85

Open
stewartadam wants to merge 2 commits into
mainfrom
claude/project-thread-njq8b9-7-timeout-all-sources
Open

stewartadam wants to merge 2 commits into
mainfrom
claude/project-thread-njq8b9-7-timeout-all-sources

Conversation

@stewartadam

@stewartadam stewartadam commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In the announce_timeout branch of check_timeouts in src/receive.rs, the outer loop over sources was:

if timedout_uni.is_none() {
    break;
}

The condition was inverted. The loop stopped after the first source in the HashMap whenever that source had no timed-out universe. Only one, effectively random, source was ever checked. For every other source, UniverseTimeout (E1.31-2016 §6.7.1 network data loss) was never reported and their stale sequence numbers were never removed.

The condition is now is_some(), so the loop stops once a timed-out universe has been found. The non-announce branch already checked every source.

Tests

  • New test_check_timeouts_announce_finds_any_source: 16 live sources and 1 timed-out source. The timed-out one is reported and removed, and nothing else times out. It fails every run with the old condition and passes with the fix.
  • cargo test and cargo clippy pass, and clippy reports no new warnings.

In the announce_timeout branch of check_timeouts, the outer loop broke
when the first source had no timed out universe, because the condition
was inverted. Only the first source in the HashMap was ever checked, so
UniverseTimeout (E1.31 network data loss) was missed for every other
source and their stale sequence numbers were never removed.

Break once a timed out universe has been found instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KzaQVQThQpmqhvLapk99Vs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KzaQVQThQpmqhvLapk99Vs
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 this pull request may close these issues.

2 participants