Skip to content

Commit

Permalink
docs(iroh-net): Improve last_pong field docs
Browse files Browse the repository at this point in the history
This is a bit confusing, at least this description is closer to the
reality.

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.
  • Loading branch information
flub committed Sep 25, 2024
1 parent 8fb92f3 commit ef04b7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 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,9 @@ 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 the path is no longer considered alive.
pub(super) recent_pong: Option<PongReply>,
/// When the last payload data was **received** via this path.
///
Expand Down

0 comments on commit ef04b7e

Please sign in to comment.