net_uv: Fix test-net-server-bind

v0.7.4-release
Ryan Dahl 2011-07-22 01:20:13 -07:00
parent fea524e145
commit 8eb1edc8ea
1 changed files with 7 additions and 5 deletions

View File

@ -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) {