Skip to content

Commit

Permalink
net: call resume in internalConnnect
Browse files Browse the repository at this point in the history
  • Loading branch information
CGQAQ committed Jul 22, 2023
1 parent 07b336d commit 7da469e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,8 @@ function internalConnect(
self, address, port, addressType, localAddress, localPort, flags) {
// TODO return promise from Socket.prototype.connect which
// wraps _connectReq.
debug('resume')
self.resume();

assert(self.connecting);

Expand Down Expand Up @@ -1582,10 +1584,8 @@ function afterConnect(status, handle, req, readable, writable) {

// Start the first read, or get an immediate EOF.
// this doesn't actually consume any bytes, because len=0.
if (readable) {
if (readable && !self.isPaused())
self.read(0);
}

if (self[kPerfHooksNetConnectContext] && hasObserver('net')) {
stopPerf(self, kPerfHooksNetConnectContext);
}
Expand Down

0 comments on commit 7da469e

Please sign in to comment.