Skip to content

Commit

Permalink
quic: cleanup timers if they haven't been already
Browse files Browse the repository at this point in the history
PR-URL: #34160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
jasnell committed Jul 5, 2020
1 parent 3837d9c commit 5a87e9b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/quic/node_quic_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,13 @@ QuicSession::~QuicSession() {
if (listener_ == listener())
RemoveListener(listener_);

// Stop and free the idle and retransmission timers if they are active.
// In a clean shutdown, using Close(), these will have already been
// stopped, but if Close() was not called and we're being destroyed
// in GC, for instance, we need to make sure they get stopped here.
StopIdleTimer();
StopRetransmitTimer();

DebugStats();
}

Expand Down

0 comments on commit 5a87e9b

Please sign in to comment.