Skip to content
Snippets Groups Projects
Commit e7d4d556 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Add a reconnect delay (Debian bug #749650).

parent b49f1c63
No related branches found
No related tags found
No related merge requests found
irker history
Repository head:
Add a reconnect delay (Debian bug #749650).
2.16: 2016-02-18
Code now runs under either Python 2 or Python 3
......
......@@ -40,6 +40,7 @@ CHANNEL_MAX = 18 # Max channels open per socket (default)
ANTI_FLOOD_DELAY = 1.0 # Anti-flood delay after transmissions, seconds
ANTI_BUZZ_DELAY = 0.09 # Anti-buzz delay after queue-empty check
CONNECTION_MAX = 200 # To avoid hitting a thread limit
RECONNECT_DELAY = 3 # Don't spam servers with connection attempts
# No user-serviceable parts below this line
......@@ -590,6 +591,7 @@ class Connection:
except IRCServerConnectionError as e:
LOG.error("irkerd: %s" % e)
self.status = "expired"
time.sleep(RECONNECT_DELAY)
break
elif self.status == "handshaking":
if time.time() > self.last_xmit + HANDSHAKE_TTL:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment