Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7435284

Browse filesBrowse files
lpincaRafaelGSS
authored andcommitted
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 <targos@protonmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 43db0fb commit 7435284
Copy full SHA for 7435284

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/js_stream_socket.js‎

Copy file name to clipboardExpand all lines: lib/internal/js_stream_socket.js
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.