Skip to content

Commit acda6f4

Browse files
committed
fix: revert net.js
1 parent a70dd45 commit acda6f4

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
@@ -1108,7 +1108,7 @@ function internalConnect(
11081108
}
11091109

11101110
const ex = new ExceptionWithHostPort(err, 'connect', address, port, details);
1111-
process.nextTick(() => self.destroy(ex));
1111+
self.destroy(ex);
11121112
} else if ((addressType === 6 || addressType === 4) && hasObserver('net')) {
11131113
startPerf(self, kPerfHooksNetConnectContext, { type: 'net', name: 'connect', detail: { host: address, port } });
11141114
}
@@ -1127,11 +1127,11 @@ function internalConnectMultiple(context, canceled) {
11271127
// All connections have been tried without success, destroy with error
11281128
if (canceled || context.current === context.addresses.length) {
11291129
if (context.errors.length === 0) {
1130-
process.nextTick(() => self.destroy(new ERR_SOCKET_CONNECTION_TIMEOUT()));
1130+
self.destroy(new ERR_SOCKET_CONNECTION_TIMEOUT());
11311131
return;
11321132
}
11331133

1134-
process.nextTick(() => self.destroy(new NodeAggregateError(context.errors)));
1134+
self.destroy(new NodeAggregateError(context.errors));
11351135
return;
11361136
}
11371137

0 commit comments

Comments
 (0)