net: move debug statement
This will allow `localAddress` to be properly set before writing debug output. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
6db825ae82
commit
2154a3ce0f
@ -887,9 +887,6 @@ function internalConnect(
|
||||
var err;
|
||||
|
||||
if (localAddress || localPort) {
|
||||
debug('binding to localAddress: %s and localPort: %d (addressType: %d)',
|
||||
localAddress, localPort, addressType);
|
||||
|
||||
if (addressType === 4) {
|
||||
localAddress = localAddress || '0.0.0.0';
|
||||
err = self._handle.bind(localAddress, localPort);
|
||||
@ -900,6 +897,8 @@ function internalConnect(
|
||||
self.destroy(new TypeError('Invalid addressType: ' + addressType));
|
||||
return;
|
||||
}
|
||||
debug('binding to localAddress: %s and localPort: %d (addressType: %d)',
|
||||
localAddress, localPort, addressType);
|
||||
|
||||
if (err) {
|
||||
const ex = exceptionWithHostPort(err, 'bind', localAddress, localPort);
|
||||
|
Loading…
x
Reference in New Issue
Block a user