Skip to content

Commit

Permalink
docs(iroh-net): Improve last_pong field docs (#2747)
Browse files Browse the repository at this point in the history
## Description

This is a bit confusing, at least this description is closer to the
reality.

## Breaking Changes

None

## Notes & open questions

Not mentioning PING_TIMEOUT_DURATION since that is not strictly true,
if the socket has signs of being alive but a pong is lost it will
still be considered alive and the pong timeout will not be cleared.

## Change checklist

- [x] Self-review.
- [x] 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
flub authored Sep 25, 2024
1 parent 8fb92f3 commit 19c8fd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iroh-net/src/magicsock/node_map/path_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ pub(super) struct PathState {
/// The time this endpoint was last advertised via a call-me-maybe DISCO message.
pub(super) call_me_maybe_time: Option<Instant>,

/// Last [`PongReply`] received.
/// The most recent [`PongReply`].
///
/// Previous replies are cleared when they are no longer relevant to determine whether
/// this path can still be used to reach the remote node.
pub(super) recent_pong: Option<PongReply>,
/// When the last payload data was **received** via this path.
///
Expand Down

0 comments on commit 19c8fd3

Please sign in to comment.