Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

quic: compute retransmission timeout correctly #157

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/node_quic_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-quic-packetloss.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Flags: --expose-internals
'use strict';

// This test is not yet working correctly because data
Expand Down