From: Eric S. Raymond Date: Sat, 16 Nov 2013 10:15:18 +0000 (-0500) Subject: Slightly more elegant fix, no need for new connectfail status. X-Git-Tag: 2.0~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9fcc6717cd435194225b02ea6d5895364b8ceaf2;p=irker.git Slightly more elegant fix, no need for new connectfail status. --- diff --git a/irkerd b/irkerd index 2343637..fb4aae6 100755 --- a/irkerd +++ b/irkerd @@ -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"