diff --git a/src/node_quic_session.cc b/src/node_quic_session.cc index 41472d974f..fcf0271237 100644 --- a/src/node_quic_session.cc +++ b/src/node_quic_session.cc @@ -1291,7 +1291,8 @@ void QuicSession::RemoveStream(int64_t stream_id) { void QuicSession::ScheduleRetransmit() { uint64_t now = uv_hrtime(); uint64_t expiry = ngtcp2_conn_get_expiry(Connection()); - uint64_t interval = (expiry < now) ? 1 : ((expiry - now) / 1000000UL); + uint64_t interval = (expiry - now) / 1000000UL; + if (expiry < now || interval == 0) interval = 1; Debug(this, "Scheduling the retransmit timer for %" PRIu64, interval); UpdateRetransmitTimer(interval); } diff --git a/test/parallel/test-quic-packetloss.js b/test/parallel/test-quic-packetloss.js index 78bd4a3894..577b798f62 100644 --- a/test/parallel/test-quic-packetloss.js +++ b/test/parallel/test-quic-packetloss.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; // This test is not yet working correctly because data