getConnectionFamily() IP address fix
authorDarren <darren@darrenwhitlen.com>
Fri, 2 Aug 2013 11:07:03 +0000 (12:07 +0100)
committerDarren <darren@darrenwhitlen.com>
Fri, 2 Aug 2013 11:07:03 +0000 (12:07 +0100)
server/irc/connection.js

index d8bf8048f708464fb155b524ab8d41e1bfb9f84f..37aa13433ac107a2725c2e67d15e07628fc575a3 100644 (file)
@@ -419,9 +419,9 @@ IrcConnection.prototype.setEncoding = function (encoding) {
 function getConnectionFamily(host, callback) {
     if (net.isIP(host)) {
         if (net.isIPv4(host)) {
-            setImmediate(callback, null, 'IPv4', host);
+            callback(null, 'IPv4', host);
         } else {
-            setImmediate(callback, null, 'IPv6', host);
+            callback(null, 'IPv6', host);
         }
     } else {
         dns.resolve6(host, function resolve6Cb(err, addresses) {