Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f8f2ae8

Browse files
lpincadanielleadams
authored andcommittedDec 30, 2022
lib: use process.nextTick() instead of setImmediate()
Do not delay the call to `stream.end()` too much. PR-URL: #42340 Refs: #42340 (comment) Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 00c2311 commit f8f2ae8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/internal/js_stream_socket.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class JSStreamSocket extends Socket {
141141

142142
const handle = this._handle;
143143

144-
setImmediate(() => {
144+
process.nextTick(() => {
145145
// Ensure that write is dispatched asynchronously.
146146
this.stream.end(() => {
147147
this.finishShutdown(handle, 0);

0 commit comments

Comments
 (0)
Please sign in to comment.