From: Eric S. Raymond Date: Fri, 5 Oct 2012 14:00:13 +0000 (-0400) Subject: Prevent repeated disconnects. X-Git-Tag: 1.7~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a6fa4ae3e25de92f5a34b6af2f1160440eb09427;p=irker.git Prevent repeated disconnects. --- diff --git a/irkerd b/irkerd index 8c512e2..042ae29 100755 --- a/irkerd +++ b/irkerd @@ -200,8 +200,9 @@ class Connection: # the connection rather than holding a socket open in # the server forever. now = time.time() - if now > self.last_xmit + XMIT_TTL \ - or now > self.last_ping + PING_TTL: + if (now > self.last_xmit + XMIT_TTL \ + or now > self.last_ping + PING_TTL) \ + and self.status != "disconnected": self.irker.debug(1, "timing out inactive connection to %s at %s" % (self.servername, time.asctime())) self.connection.context = None self.connection.quit("transmission timeout")