net: remove redundant connecting assignment

PR-URL: https://github.com/nodejs/node/pull/43710
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
This commit is contained in:
Ouyang Yadong authored and Michaël Zasso committed 2022-07-12 07:41:56 +02:00
1 parent 5a5c4be5a3
commit bf4ac4c55f
2 files changed
+1 -1

No files matched your search

-1
View File
@@ -1239,7 +1239,6 @@ function afterConnect(status, handle, req, readable, writable) {
stopPerf(self, kPerfHooksNetConnectContext);
}
} else {
self.connecting = false;
let details;
if (req.localAddress && req.localPort) {
details = req.localAddress + ':' + req.localPort;
@@ -27,5 +27,6 @@ const assert = require('assert');
const c = net.createConnection(common.PORT);
c.on('connect', common.mustNotCall());
c.on('error', common.mustCall((e) => {
assert.strictEqual(c.connecting, false);
assert.strictEqual(e.code, 'ECONNREFUSED');
}));