mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +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__
|
||||||
|
|
||||||
|
@ -85,6 +85,8 @@ class SupyIrcProtocol(LineReceiver):
|
|||||||
|
|
||||||
def die(self):
|
def die(self):
|
||||||
self.transport.loseConnection()
|
self.transport.loseConnection()
|
||||||
|
|
||||||
|
reconnect = die
|
||||||
|
|
||||||
|
|
||||||
class SupyReconnectingFactory(ReconnectingClientFactory):
|
class SupyReconnectingFactory(ReconnectingClientFactory):
|
||||||
|
Loading…
Reference in New Issue
Block a user