From: Darren Date: Fri, 2 Aug 2013 11:07:03 +0000 (+0100) Subject: getConnectionFamily() IP address fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3e01340eed22bacc156992da6279fd28f54fc29c;p=KiwiIRC.git getConnectionFamily() IP address fix --- diff --git a/server/irc/connection.js b/server/irc/connection.js index d8bf804..37aa134 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -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) {