aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2016-01-12 15:12:42 -0500
committerEric S. Raymond <esr@thyrsus.com>2016-01-12 15:12:42 -0500
commitd05aa39e0193bf1ba39920857b6f41a2fa3bdf8e (patch)
tree1394f299ed642fff8039dce2aa1194cddc1f9b28
parentVersion bump for release 2.14 (diff)
downloadirker-2.15.tar.xz
Version bump for release 2.152.15
-rw-r--r--NEWS4
-rwxr-xr-xirkerd31
2 files changed, 13 insertions, 22 deletions
diff --git a/NEWS b/NEWS
index 7b100bc..caa3aab 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,11 @@
irker history
+2.15: 2016-01-12
+ Emergency backout of getaddrinfo, it randomly hanges.
+
2.14: 2016-01-12
Lookup with getaddrinfo allows use with IPv6.
+ Documentation improvements.
2.13: 2015-06-14
SSL validation fix.
diff --git a/irkerd b/irkerd
index c70fe11..c13aae7 100755
--- a/irkerd
+++ b/irkerd
@@ -42,7 +42,7 @@ CONNECTION_MAX = 200 # To avoid hitting a thread limit
# No user-serviceable parts below this line
-version = "2.14"
+version = "2.15"
import argparse
import logging
@@ -286,27 +286,14 @@ class IRCServerConnection():
self.real_server_name = ""
self.target = target
self.nickname = nickname
-
- err = None
- for res in socket.getaddrinfo(target.servername, target.port, 0, socket.SOCK_STREAM):
- af, socktype, proto, canonname, sa = res
- self.socket = None
- try:
- self.socket = socket.socket(af, socktype, proto)
- if target.ssl:
- self.socket = self._wrap_socket(
- socket=self.socket, target=target, **kwargs)
- self.socket.bind(('', 0))
- self.socket.connect(sa)
- except socket.error as _:
- err = _
- if self.socket is not None:
- self.socket.close()
-
- if self.socket is None:
- err = socket.error("getaddrinfo returns an empty list")
-
- if err is not None:
+ try:
+ self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ if target.ssl:
+ self.socket = self._wrap_socket(
+ socket=self.socket, target=target, **kwargs)
+ self.socket.bind(('', 0))
+ self.socket.connect((target.servername, target.port))
+ except socket.error as err:
raise IRCServerConnectionError("Couldn't connect to socket: %s" % err)
if target.ssl: