File tree 1 file changed +11
-1
lines changed
neqo-transport/src/connection
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ enum IdleTimeoutState {
24
24
25
25
#[ derive( Debug , Clone ) ]
26
26
/// 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>
28
30
pub struct IdleTimeout {
29
31
timeout : Duration ,
30
32
state : IdleTimeoutState ,
@@ -61,6 +63,14 @@ impl IdleTimeout {
61
63
// Only reset idle timeout if we've received a packet since the last
62
64
// time we reset the timeout here.
63
65
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.
64
74
IdleTimeoutState :: AckElicitingPacketSent ( _) => { }
65
75
IdleTimeoutState :: Init | IdleTimeoutState :: PacketReceived ( _) => {
66
76
self . state = IdleTimeoutState :: AckElicitingPacketSent ( now) ;
You can’t perform that action at this time.
0 commit comments