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 bd0f965
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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,7 +1584,7 @@ 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);
}

Expand Down

0 comments on commit bd0f965

Please sign in to comment.