Skip to content
Snippets Groups Projects
Commit 93f58858 authored by Vijver, van de, Bob (UT-GUEST)'s avatar Vijver, van de, Bob (UT-GUEST)
Browse files

Restore ping timeout disconnect behaviour

parent 10c75588
No related branches found
No related tags found
No related merge requests found
...@@ -559,7 +559,17 @@ class Connection: ...@@ -559,7 +559,17 @@ class Connection:
# If the queue is empty, we can drop this connection. # If the queue is empty, we can drop this connection.
self.status = "expired" self.status = "expired"
break break
elif xmit_timeout or ping_timeout: elif ping_timeout:
LOG.info((
"timing out connection to %s at %s "
"(ping_timeout=%s, xmit_timeout=%s)") % (
self.target, time.asctime(), ping_timeout,
xmit_timeout))
with self.irker.irc.mutex:
self.connection.context = None
self.connection.quit("transmission timeout")
self.connection = None
self.status = "disconnected"
time.sleep(ANTI_BUZZ_DELAY) time.sleep(ANTI_BUZZ_DELAY)
else: else:
# Prevent this thread from hogging the CPU by pausing # Prevent this thread from hogging the CPU by pausing
......
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