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

Slightly more elegant fix, no need for new connectfail status.

parent 82442ed5
No related branches found
No related tags found
No related merge requests found
......@@ -412,7 +412,7 @@ class Connection:
def handle_disconnect(self):
"Server disconnected us for flooding or some other reason."
self.connection = None
if self.status != "connectfail":
if self.status != "expired":
self.status = "disconnected"
def handle_kick(self, outof):
"We've been kicked."
......@@ -480,7 +480,7 @@ class Connection:
# space forever would be a memory leak.
self.status = "expired"
break
elif not self.connection and self.status != "connectfail":
elif not self.connection and self.status != "expired":
# Queue is nonempty but server isn't connected.
with self.irker.irc.mutex:
self.connection = self.irker.irc.newserver()
......@@ -501,7 +501,7 @@ class Connection:
self.last_xmit = time.time()
self.last_ping = time.time()
except IRCServerConnectionError:
self.status = "connectfail"
self.status = "expired"
elif self.status == "handshaking":
if time.time() > self.last_xmit + HANDSHAKE_TTL:
self.status = "expired"
......
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