Skip to content

fix(netwatch): various small improvments#103

Merged
dignifiedquire merged 9 commits into
mainfrom
fix-debounce
Feb 26, 2026
Merged

fix(netwatch): various small improvments#103
dignifiedquire merged 9 commits into
mainfrom
fix-debounce

Conversation

@dignifiedquire
Copy link
Copy Markdown
Contributor

  • 2487d66: The parse_rib loop failed to advance the buffer pointer when encountering a message with a mismatched routing stack version, causing an infinite loop.
  • 8785aa1:Iterator::zip silently stopped at the shorter iterator, so an interface gaining or losing addresses was not detected as a change.
  • da51515: The comparison only iterated the old state's interfaces, so a newly appeared interface was never reported as a major change.
  • 10eb2c8: The Option<bool> pending state allowed a normal network event to overwrite a pending time-jump signal before it was processed.
  • f3986e3: Interval::reset_immediately() caused the debounce timer to fire on the next poll, defeating burst coalescing. A one-shot Sleep that extends its deadline on each event now provides a true quiet-period debounce.
  • 68a334f: The unregister methods removed the Arc<Callback> from the map before calling CancelMibChangeNotify2, creating a window where Windows could invoke a callback through a dangling pointer.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 26, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/net-tools/pr/103/docs/net_tools/

Last updated: 2026-02-26T12:19:29Z

@n0bot n0bot Bot added this to iroh Feb 26, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Feb 26, 2026
Copy link
Copy Markdown
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks good i think. glad to see the 250ms wakeup interval being gone. one nit/question more.

Comment thread netwatch/src/interfaces.rs Outdated
Copy link
Copy Markdown
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good, but have some nits.

Also - I still don't understand why the debouncing logic needs an interval instead of just a simple sleep that is bounced back via reset?
Wth I swear this wasn't changed before I reviewed!

Comment thread netwatch/src/interfaces.rs Outdated
Comment thread netwatch/src/interfaces/wasm_browser.rs Outdated
@dignifiedquire dignifiedquire merged commit f199ee2 into main Feb 26, 2026
27 checks passed
@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to ✅ Done in iroh Feb 26, 2026
@dignifiedquire dignifiedquire deleted the fix-debounce branch February 26, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants