Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iroh-net): Clear the recent pong time when pong is lost (#2743)
## Description When we do not receive a pong in the timeframe we should have, we remove the last ping time and clear the best_addr. However the path will be re-selected from the candidates as long as the pong time is set. This additionally clears the pong time so that there is no longer an indication this path works. While the DISCO ping-pong is not loss-protected there is already an existing check that ensures this clear is not triggered when there are still other signs of life from the remote node. ## Breaking Changes None ## Notes & open questions Note that when sending call-me-maybe the pong times are also cleared. So while I'm not a particular fan of this, it is the intended way to use this. Ideally the PathState would be clearer about this data and store this as separately. But the PathState data needs a general cleanup and I do not want to mix in extra state for now. Fixes a bug found by @zh522130 ## Change checklist - [x] Self-review. - ~~[ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant.~~ - ~~[ ] Tests if relevant.~~ - ~~[ ] All breaking changes documented.~~
- Loading branch information