From ef1d7d31363ceb8449aaa73f2ceb9ff8ed331f82 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 27 Sep 2012 11:37:06 -0400 Subject: [PATCH] nenolod's fix for overzealous garbage collection. --- irker | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/irker b/irker index cdd247b..f3167f6 100755 --- a/irker +++ b/irker @@ -220,9 +220,9 @@ class Dispatcher: self.connections = [] def dispatch(self, channel, message): "Dispatch messages for our server-port combination." - self.connections = [x for x in self.connections if x.live()] - eligibles = [x for x in self.connections if x.joined_to(channel)] \ - or [x for x in self.connections if x.accepting(channel)] + connections = [x for x in self.connections if x.live()] + eligibles = [x for x in connections if x.joined_to(channel)] \ + or [x for x in connections if x.accepting(channel)] if not eligibles: newconn = Connection(self.irker, self.servername, @@ -234,7 +234,7 @@ class Dispatcher: def live(self): "Does this server-port combination have any live connections?" self.connections = [x for x in self.connections if x.live()] - return not self.connections + return len(self.connections) > 0 class Irker: "Persistent IRC multiplexer." -- 2.26.2