Skip to content

Commit 7da469e

Browse files
committed
net: call resume in internalConnnect
1 parent 07b336d commit 7da469e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/net.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,8 @@ function internalConnect(
10331033
self, address, port, addressType, localAddress, localPort, flags) {
10341034
// TODO return promise from Socket.prototype.connect which
10351035
// wraps _connectReq.
1036+
debug('resume')
1037+
self.resume();
10361038

10371039
assert(self.connecting);
10381040

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

15831585
// Start the first read, or get an immediate EOF.
15841586
// this doesn't actually consume any bytes, because len=0.
1585-
if (readable) {
1587+
if (readable && !self.isPaused())
15861588
self.read(0);
1587-
}
1588-
15891589
if (self[kPerfHooksNetConnectContext] && hasObserver('net')) {
15901590
stopPerf(self, kPerfHooksNetConnectContext);
15911591
}

0 commit comments

Comments
 (0)