mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
5a5c4be5a3
commit
bf4ac4c55f
2 files changed
+1
-1
No files matched your search
@@ -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');
|
||||
}));
|
||||
Reference in new issue
Block a user