mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Fixed asyncore hogging the CPU on disconnect. Although this really looks
like a bug in asyncore to me. o_O
This commit is contained in:
parent
03294c8686
commit
bea41b308a
@ -52,7 +52,12 @@ class AsyncoreRunnerDriver(drivers.IrcDriver):
|
||||
def run(self):
|
||||
#log.debug(repr(asyncore.socket_map))
|
||||
try:
|
||||
asyncore.poll(conf.supybot.drivers.poll())
|
||||
timeout = conf.supybot.drivers.poll()
|
||||
if len(asyncore.socket_map.keys()) < 1:
|
||||
# FIXME: asyncore should take care of this... but it doesn't?
|
||||
time.sleep(timeout)
|
||||
else:
|
||||
asyncore.poll(timeout)
|
||||
except:
|
||||
log.exception('Uncaught exception:')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user