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

Commit

Permalink
quic: call the _destroy callback in a nextTick
Browse files Browse the repository at this point in the history
PR-URL: #341
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
jasnell committed Feb 12, 2020
1 parent bfbffbf commit e8981f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/quic/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2773,7 +2773,8 @@ class QuicStream extends Duplex {
this.#stats = new BigInt64Array(handle.stats);
handle.destroy();
}
callback(error);
// The destroy callback must be invoked in a nextTick
process.nextTick(() => callback(error));
}

_onTimeout() {
Expand Down

0 comments on commit e8981f3

Please sign in to comment.