Browse Source

lib: fix unnecessary coercion in lib/net.js

Original patch by @skypjack in #6627
v0.11.11-release
Thom Seddon 11 years ago
committed by Fedor Indutny
parent
commit
657cd2c4e5
  1. 6
      lib/net.js

6
lib/net.js

@ -784,7 +784,7 @@ function connect(self, address, port, addressType, localAddress) {
var err;
if (localAddress) {
if (addressType == 6) {
if (addressType === 6) {
err = self._handle.bind6(localAddress);
} else {
err = self._handle.bind(localAddress);
@ -1020,7 +1020,7 @@ var createServerHandle = exports._createServerHandle =
handle.writable = true;
return handle;
} else if (port == -1 && addressType == -1) {
} else if (port === -1 && addressType === -1) {
handle = createPipe();
if (process.platform === 'win32') {
var instances = parseInt(process.env.NODE_PENDING_PIPE_INSTANCES);
@ -1034,7 +1034,7 @@ var createServerHandle = exports._createServerHandle =
if (address || port) {
debug('bind to ' + address);
if (addressType == 6) {
if (addressType === 6) {
err = handle.bind6(address, port);
} else {
err = handle.bind(address, port);

Loading…
Cancel
Save