Skip to content

Commit bf4ac4c

Browse files
oyydtargos
authored andcommitted
net: remove redundant connecting assignment
PR-URL: #43710 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Paolo Insogna <[email protected]>
1 parent 5a5c4be commit bf4ac4c

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

lib/net.js

-1
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,6 @@ function afterConnect(status, handle, req, readable, writable) {
12391239
stopPerf(self, kPerfHooksNetConnectContext);
12401240
}
12411241
} else {
1242-
self.connecting = false;
12431242
let details;
12441243
if (req.localAddress && req.localPort) {
12451244
details = req.localAddress + ':' + req.localPort;

test/sequential/test-net-connect-handle-econnrefused.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ const assert = require('assert');
2727
const c = net.createConnection(common.PORT);
2828
c.on('connect', common.mustNotCall());
2929
c.on('error', common.mustCall((e) => {
30+
assert.strictEqual(c.connecting, false);
3031
assert.strictEqual(e.code, 'ECONNREFUSED');
3132
}));

0 commit comments

Comments
 (0)