Skip to content
This repository was archived by the owner on Aug 31, 2018. It is now read-only.

Commit d79582b

Browse files
mscdexOlivia Hugger
authored andcommitted
net: move debug statement
This will allow `localAddress` to be properly set before writing debug output. PR-URL: nodejs/node#12616 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent b641c4c commit d79582b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/net.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,6 @@ function internalConnect(
887887
var err;
888888

889889
if (localAddress || localPort) {
890-
debug('binding to localAddress: %s and localPort: %d (addressType: %d)',
891-
localAddress, localPort, addressType);
892-
893890
if (addressType === 4) {
894891
localAddress = localAddress || '0.0.0.0';
895892
err = self._handle.bind(localAddress, localPort);
@@ -900,6 +897,8 @@ function internalConnect(
900897
self.destroy(new TypeError('Invalid addressType: ' + addressType));
901898
return;
902899
}
900+
debug('binding to localAddress: %s and localPort: %d (addressType: %d)',
901+
localAddress, localPort, addressType);
903902

904903
if (err) {
905904
const ex = exceptionWithHostPort(err, 'bind', localAddress, localPort);

0 commit comments

Comments
 (0)