diff --git a/lib/xmpp/srv.js b/lib/xmpp/srv.js
index <HASH>..<HASH> 100644
--- a/lib/xmpp/srv.js
+++ b/lib/xmpp/srv.js
@@ -73,20 +73,16 @@ function resolveSrv(name, cb) {
 
 // one of both A & AAAA, in case of broken tunnels
 function resolveHost(name, cb) {
-    var error, results = [], pending = 2;
-    var cb1 = function(e, addrs) {
+    var error, results = [];
+    var cb1 = function(e, addr) {
         error = error || e;
-        var addr = addrs && addrs[Math.floor(Math.random() * addrs.length)];
         if (addr)
             results.push(addr);
 
-        pending--;
-        if (pending < 1)
-            cb((results.length > 0) ? null : error, results);
+        cb((results.length > 0) ? null : error, results);
     };
 
-    dns.resolve4(name, cb1);
-    dns.resolve6(name, cb1);
+    dns.lookup(name, cb1);
 }
 
 // connection attempts to multiple addresses in a row
Use dns.lookup() rather than dns.resolve4/6(). Abandons parallelism but finds localhost.