Skip to content

Commit 5ee492e

Browse files
committed
quic: cleanup timers if they haven't been already
1 parent d1bbb55 commit 5ee492e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/quic/node_quic_session.cc

+7
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,13 @@ QuicSession::~QuicSession() {
14681468
if (listener_ == listener())
14691469
RemoveListener(listener_);
14701470

1471+
// Stop and free the idle and retransmission timers if they are active.
1472+
// In a clean shutdown, using Close(), these will have already been
1473+
// stopped, but if Close() was not called and we're being destroyed
1474+
// in GC, for instance, we need to make sure they get stopped here.
1475+
StopIdleTimer();
1476+
StopRetransmitTimer();
1477+
14711478
DebugStats();
14721479
}
14731480

0 commit comments

Comments
 (0)