Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
net: activate setNoDelay by default
Fixes: #34185
  • Loading branch information
voxpelli committed Nov 10, 2021
commit 5bdcf577a38bf5c80640260da3e38c47168d12f7
5 changes: 4 additions & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ function initSocketHandle(self) {
self._handle.onread = onStreamRead;
self[async_id_symbol] = getNewAsyncId(self._handle);

if (self._handle.setNoDelay && self[kSetNoDelay] === true)
self._handle.setNoDelay(true);

let userBuf = self[kBuffer];
if (userBuf) {
const bufGen = self[kBufferGen];
Expand Down Expand Up @@ -307,7 +310,7 @@ function Socket(options) {
this[kHandle] = null;
this._parent = null;
this._host = null;
this[kSetNoDelay] = false;
this[kSetNoDelay] = true;
this[kLastWriteQueueSize] = 0;
this[kTimeout] = null;
this[kBuffer] = null;
Expand Down