Description: Revert "implement Happy Eyeballs"
This functionality relies on the `rfc6555` Python module, which is not
available on Debian.

Ported from offlineimap.
 
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Forwarded: not-needed

---

diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
index 13b2299..5e9a606 100644
--- a/offlineimap/imaplibutil.py
+++ b/offlineimap/imaplibutil.py
@@ -23,7 +23,6 @@ import errno
 import zlib
 from sys import exc_info
 from hashlib import sha512, sha384, sha256, sha224, sha1
-import rfc6555
 from offlineimap import OfflineImapError
 from offlineimap.ui import getglobalui
 from imaplib2 import IMAP4, IMAP4_SSL, InternalDate
@@ -82,14 +81,7 @@ class UsefulIMAPMixIn:
     def open_socket(self):
         """open_socket()
         Open socket choosing first address family available."""
-        if self.af == socket.AF_UNSPEC:
-            # happy-eyeballs!
-            return rfc6555.create_connection((self.host, self.port))
-        else:
-            return self._open_socket_for_af(self.af)
-
-    def _open_socket_for_af(self, af):
-        for res in socket.getaddrinfo(self.host, self.port, af, socket.SOCK_STREAM):
+        for res in socket.getaddrinfo(self.host, self.port, self.af, socket.SOCK_STREAM):
             af, socktype, proto, canonname, sa = res
             try:
                 # use socket of our own, possibly SOCKS socket.
diff --git a/requirements.txt b/requirements.txt
index e580f5f..5917ec2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,6 @@
 # Requirements
 gssapi[kerberos]
 portalocker[cygwin]
-rfc6555
 distro
 
 imaplib2>=3.5
