mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
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.scheduleReconnect()
|
||||||
self.die()
|
self.die()
|
||||||
|
|
||||||
|
reconnect = handle_close
|
||||||
|
|
||||||
def handle_connect(self):
|
def handle_connect(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -65,6 +65,9 @@ class IrcDriver(object):
|
|||||||
# sure this (and anything else later added) is done.
|
# sure this (and anything else later added) is done.
|
||||||
_deadDrivers.append(self.name())
|
_deadDrivers.append(self.name())
|
||||||
|
|
||||||
|
def reconnect(self):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
def name(self):
|
def name(self):
|
||||||
return self.__class__.__name__
|
return self.__class__.__name__
|
||||||
|
|
||||||
|
@ -86,6 +86,8 @@ class SupyIrcProtocol(LineReceiver):
|
|||||||
def die(self):
|
def die(self):
|
||||||
self.transport.loseConnection()
|
self.transport.loseConnection()
|
||||||
|
|
||||||
|
reconnect = die
|
||||||
|
|
||||||
|
|
||||||
class SupyReconnectingFactory(ReconnectingClientFactory):
|
class SupyReconnectingFactory(ReconnectingClientFactory):
|
||||||
maxDelay = 600
|
maxDelay = 600
|
||||||
|
Loading…
Reference in New Issue
Block a user