diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-07-22 12:20:13 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-07-22 12:20:27 +0400 |
commit | 8eb1edc8ea405c55b06e76111a4bc30fe16bb7fb (patch) | |
tree | 62c3db68f56ef6623e932fa0ec0e406714fcdd38 /lib | |
parent | fea524e145d7bd8d3f76d6f0fd266187144cc08c (diff) |
net_uv: Fix test-net-server-bind
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net_uv.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/net_uv.js b/lib/net_uv.js index 2c9df4b739b..8e000f68159 100644 --- a/lib/net_uv.js +++ b/lib/net_uv.js @@ -532,11 +532,13 @@ function listen(self, address, port, addressType) { self._handle.socket = self; self._handle.onconnection = onconnection; - debug("bind to " + address); - if (addressType == 6) { - r = self._handle.bind6(address, port); - } else { - r = self._handle.bind(address, port); + if (address || port) { + debug("bind to " + address); + if (addressType == 6) { + r = self._handle.bind6(address, port); + } else { + r = self._handle.bind(address, port); + } } if (r) { |