From 8eb1edc8ea405c55b06e76111a4bc30fe16bb7fb Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 22 Jul 2011 01:20:13 -0700 Subject: [PATCH] net_uv: Fix test-net-server-bind --- lib/net_uv.js | 12 +++++++----- 1 file 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) {