Created
February 19, 2016 18:32
-
-
Save evanlucas/09cef3af8e1123797b2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/net.js b/lib/net.js | |
index f75c9b2..8348df4 100644 | |
--- a/lib/net.js | |
+++ b/lib/net.js | |
@@ -1166,9 +1166,10 @@ function createServerHandle(address, port, addressType, fd) { | |
// Try binding to ipv6 first | |
err = handle.bind6('::', port); | |
if (err) { | |
+ debug('ipv6 bind error %s', err); | |
handle.close(); | |
// Fallback to ipv4 | |
- return createServerHandle('0.0.0.0', port); | |
+ err = handle.bind('0.0.0.0', port); | |
} | |
} else if (addressType === 6) { | |
err = handle.bind6(address, port); | |
@@ -1178,6 +1179,7 @@ function createServerHandle(address, port, addressType, fd) { | |
} | |
if (err) { | |
+ debug('bind error %s', err); | |
handle.close(); | |
return err; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment