Skip to content

Commit c9fab57

Browse files
committed
wip: confirmed that lazy timers do require deletion because their status is lazily changed
1 parent a24b278 commit c9fab57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/QUICConnection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,10 +1024,10 @@ class QUICConnection {
10241024
// If it is `settled`, then cancelling is a noop
10251025
// If it is `settling`, then cancelling only prevents it at the beginning of the handler
10261026
this.connTimeoutTimer?.cancel();
1027-
1028-
// FIXME: Investigate if this is needed because timer is settled synchronously after cancel
1027+
// The `this.connTimeoutTimer` is a lazy timer, so it's status may still
1028+
// be `null` or `settling`. So we have to delete it here to ensure that
1029+
// the timer will be recreated.
10291030
delete this.connTimeoutTimer;
1030-
10311031
if (this.conn.isClosed()) {
10321032
this.resolveClosedP();
10331033
if (this.conn.isTimedOut()) {

0 commit comments

Comments
 (0)