diff --git a/lib/net.js b/lib/net.js index 1bcbe94c53ddb9..5f20f08c486d22 100644 --- a/lib/net.js +++ b/lib/net.js @@ -830,12 +830,9 @@ function internalConnect( if (addressType === 4) { localAddress = localAddress || '0.0.0.0'; err = self._handle.bind(localAddress, localPort); - } else if (addressType === 6) { + } else { // addressType === 6 localAddress = localAddress || '::'; err = self._handle.bind6(localAddress, localPort); - } else { - self.destroy(new ERR_INVALID_ADDRESS_FAMILY(addressType)); - return; } debug('binding to localAddress: %s and localPort: %d (addressType: %d)', localAddress, localPort, addressType);