Skip to content

Commit

Permalink
net: remove redundant connecting assignment
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
oyyd committed Jul 9, 2022
1 parent 653cfff commit acd2a32
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions test/sequential/test-net-connect-handle-econnrefused.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}));

0 comments on commit acd2a32

Please sign in to comment.