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

Commit f72a03a

Browse files
committed
quic: call the _destroy callback in a nextTick
1 parent 9496bc8 commit f72a03a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/quic/core.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2773,7 +2773,8 @@ class QuicStream extends Duplex {
27732773
this.#stats = new BigInt64Array(handle.stats);
27742774
handle.destroy();
27752775
}
2776-
callback(error);
2776+
// The destroy callback must be invoked in a nextTick
2777+
process.nextTick(() => callback(error));
27772778
}
27782779

27792780
_onTimeout() {

0 commit comments

Comments
 (0)