Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-07-22 12:20:13 +0400
committerRyan Dahl <ry@tinyclouds.org>2011-07-22 12:20:27 +0400
commit8eb1edc8ea405c55b06e76111a4bc30fe16bb7fb (patch)
tree62c3db68f56ef6623e932fa0ec0e406714fcdd38 /lib
parentfea524e145d7bd8d3f76d6f0fd266187144cc08c (diff)
net_uv: Fix test-net-server-bind
Diffstat (limited to 'lib')
-rw-r--r--lib/net_uv.js12
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) {