diff --git a/pyxmpp2/transport.py b/pyxmpp2/transport.py
index <HASH>..<HASH> 100644
--- a/pyxmpp2/transport.py
+++ b/pyxmpp2/transport.py
@@ -769,6 +769,10 @@ class TCPTransport(XMPPTransport, IOHandler):
         Handle an error reported.
         """
         with self.lock:
+            if self._state == 'connecting' and self._dst_addrs:
+                self._hup = False
+                self._set_state("connect")
+                return
             self._socket.close()
             self._socket = None
             self._set_state("aborted")
error when connecting, just try next address

This can happen when DNS returns multiple IPs (e.g. IPv6 and IPv4 ones),
and connecting with the first one fails (e.g. server isn't listen on IPv6).