From a6fa4ae3e25de92f5a34b6af2f1160440eb09427 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 5 Oct 2012 10:00:13 -0400 Subject: [PATCH] Prevent repeated disconnects. --- irkerd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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") -- 2.26.2