Skip to content

fix(networking): tolerate UDP probe startup races - #3

Merged
Zendevve merged 2 commits into
Zendevve:mainfrom
ovasylenko:feat/two-node-lan-match-runner-opencade
Aug 24, 2026
Merged

Zendevve merged 2 commits into
Zendevve:mainfrom
ovasylenko:feat/two-node-lan-match-runner-opencade

Conversation

@ovasylenko

@ovasylenko ovasylenko commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • classify connected-UDP ConnectionRefused and ConnectionReset as one typed, retryable peer-startup condition
  • preserve the Windows WSAECONNRESET behavior already merged in da5c6e5 without relying on OS error-message strings
  • retry bounded probe sends/receives while the peer process is binding
  • extend only the post-transcript final-frame response grace from 250 ms to one second
  • add coverage for both portable std::io::ErrorKind variants
  • normalize the already-generated protocol bindings left raw by the parent merge so the existing CI drift gate passes

Why

The LAN runner is already merged into OpenCade:main. A Linux CI run then exposed ECONNREFUSED when one connected UDP process sent before the other process bound its port. Stress testing also exposed an occasional frame-59 timeout when a shared runner delayed one process beyond the original 250 ms completion grace.

These errors represent transient ICMP feedback during peer startup, not permanent transport failure. Other UDP errors remain fatal, and the normal match deadline remains bounded.

Validation

  • Rust 1.78 formatting
  • networking Clippy with warnings denied
  • all 10 networking unit tests
  • real two-process UDP integration test
  • 25 consecutive two-process runs before rebase
  • 10 consecutive two-process runs after rebasing onto da5c6e5
  • protocol export followed by the same Prettier normalization command used in CI

Scope

The functional change is limited to packages/networking/src/lib.rs and
packages/networking/src/probe.rs. The remaining changed files are mechanical formatting of
committed generated protocol bindings required by the existing CI drift gate.

OpenFight carries the equivalent fix in ovasylenko#2.

@ovasylenko
ovasylenko force-pushed the feat/two-node-lan-match-runner-opencade branch from d7b37e4 to 003bea5 Compare August 24, 2026 01:14
@ovasylenko ovasylenko changed the title feat: add two-node LAN match runner fix(networking): tolerate UDP probe startup races Aug 24, 2026
@Zendevve
Zendevve merged commit 8cf87de into Zendevve:main Aug 24, 2026
3 checks passed
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