mirror of https://github.com/Mikaela/Limnoria.git
Added .reconnect() method to drivers.
This commit is contained in:
parent
e1e6b974d6
commit
06fe786029
|
@ -121,6 +121,8 @@ class AsyncoreDriver(asynchat.async_chat, object):
|
|||
self.scheduleReconnect()
|
||||
self.die()
|
||||
|
||||
reconnect = handle_close
|
||||
|
||||
def handle_connect(self):
|
||||
pass
|
||||
|
||||
|
|
|
@ -65,6 +65,9 @@ class IrcDriver(object):
|
|||
# sure this (and anything else later added) is done.
|
||||
_deadDrivers.append(self.name())
|
||||
|
||||
def reconnect(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def name(self):
|
||||
return self.__class__.__name__
|
||||
|
||||
|
|
|
@ -86,6 +86,8 @@ class SupyIrcProtocol(LineReceiver):
|
|||
def die(self):
|
||||
self.transport.loseConnection()
|
||||
|
||||
reconnect = die
|
||||
|
||||
|
||||
class SupyReconnectingFactory(ReconnectingClientFactory):
|
||||
maxDelay = 600
|
||||
|
|
Loading…
Reference in New Issue