Skip to content

Commit 0b70e11

Browse files
authored
test(proto): Stop driving the connection before a path idle timer fires (#557)
## Description This is more in line with what `is_idle` is doing with `ConnIdle` as well, and in the future once we handle #518 this is even more important, as the tests expect that calling `pair.drive()` doesn't run the connection till the idle timeout. ## Breaking Changes Test changes only.
1 parent c2103a1 commit 0b70e11

File tree

1 file changed

+6
-2
lines changed
  • noq-proto/src/connection

1 file changed

+6
-2
lines changed

noq-proto/src/connection/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6564,13 +6564,17 @@ impl Connection {
65646564
timer,
65656565
Timer::Conn(ConnTimer::KeepAlive)
65666566
| Timer::PerPath(_, PathTimer::PathKeepAlive)
6567-
| Timer::PerPath(_, PathTimer::PathIdle)
65686567
| Timer::Conn(ConnTimer::PushNewCid)
65696568
| Timer::Conn(ConnTimer::KeyDiscard)
65706569
)
65716570
})
65726571
.min_by_key(|(_, time)| *time)
6573-
.is_none_or(|(timer, _)| timer == Timer::Conn(ConnTimer::Idle))
6572+
.is_none_or(|(timer, _)| {
6573+
matches!(
6574+
timer,
6575+
Timer::Conn(ConnTimer::Idle) | Timer::PerPath(_, PathTimer::PathIdle)
6576+
)
6577+
})
65746578
}
65756579

65766580
/// Whether explicit congestion notification is in use on outgoing packets.

0 commit comments

Comments
 (0)