Finally fixed looping bug. Really. I mean it this time. I fixed it. It's gone.

This commit is contained in:
Jeremy Fincher 2003-04-12 12:04:47 +00:00
parent f1ee8b1bbd
commit d7fce630d5

View File

@ -64,13 +64,14 @@ class AsyncoreDriver(asynchat.async_chat, object):
self.server = (server, port) self.server = (server, port)
self.reconnect = reconnect self.reconnect = reconnect
self.irc = irc self.irc = irc
self.irc.driver = self
self.buffer = '' self.buffer = ''
self.set_terminator('\n') self.set_terminator('\n')
self.create_socket(socket.AF_INET, socket.SOCK_STREAM) self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
try: try:
self.connect(self.server) self.connect(self.server)
except: except:
debug.recoverableException() debug.recoverableException('terse')
self.scheduleReconnect() self.scheduleReconnect()
self.close() self.close()
@ -124,6 +125,9 @@ class AsyncoreDriver(asynchat.async_chat, object):
self.scheduleReconnect() self.scheduleReconnect()
self.die() self.die()
def handle_connect(self):
pass
def die(self): def die(self):
self.close() self.close()