Skip to content

Commit

Permalink
net: remove redundant connecting assignment
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#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>
  • Loading branch information
oyyd authored and guangwong committed Oct 10, 2022
1 parent b7654bb commit bc045e1
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 bc045e1

Please sign in to comment.