Skip to content

Commit eb3e2a6

Browse files
authored
docs(transport): improve idle timeout RFC references (#2510)
1 parent 0a9d8be commit eb3e2a6

File tree

1 file changed

+11
-1
lines changed
  • neqo-transport/src/connection

1 file changed

+11
-1
lines changed

neqo-transport/src/connection/idle.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ enum IdleTimeoutState {
2424

2525
#[derive(Debug, Clone)]
2626
/// There's a little bit of different behavior for resetting idle timeout. See
27-
/// -transport 10.2 ("Idle Timeout").
27+
/// -transport 10.1 ("Idle Timeout").
28+
///
29+
/// <https://datatracker.ietf.org/doc/html/rfc9000#section-10.1>
2830
pub struct IdleTimeout {
2931
timeout: Duration,
3032
state: IdleTimeoutState,
@@ -61,6 +63,14 @@ impl IdleTimeout {
6163
// Only reset idle timeout if we've received a packet since the last
6264
// time we reset the timeout here.
6365
match self.state {
66+
// > An endpoint also restarts its idle timer when sending an
67+
// > ack-eliciting packet if no other ack-eliciting packets have
68+
// > been sent since last receiving and processing a packet.
69+
//
70+
// <https://datatracker.ietf.org/doc/html/rfc9000#section-10.1>
71+
//
72+
// Conversely, given that a packet has been sent since last
73+
// receival, don't reset idle timer.
6474
IdleTimeoutState::AckElicitingPacketSent(_) => {}
6575
IdleTimeoutState::Init | IdleTimeoutState::PacketReceived(_) => {
6676
self.state = IdleTimeoutState::AckElicitingPacketSent(now);

0 commit comments

Comments
 (0)