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

nenolod's fix for overzealous garbage collection.

parent 72d1d8e3
No related branches found
No related tags found
No related merge requests found
......@@ -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."
......
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