Created
July 24, 2018 15:44
-
-
Save progval/6aadc77426dbae6316439e1574bcabb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py | |
index c9e9d19f..08787fb4 100644 | |
--- a/src/drivers/Socket.py | |
+++ b/src/drivers/Socket.py | |
@@ -223,7 +223,13 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): | |
def connect(self, **kwargs): | |
self.reconnect(reset=False, **kwargs) | |
- def reconnect(self, wait=False, reset=True): | |
+ def reconnect(self, **kwargs): | |
+ self._reconnect_thread = world.SupyThread( | |
+ target=self._reconnect, kwargs=kwargs, | |
+ name='connect_to_%s' % self.irc) | |
+ self._reconnect_thread.start() | |
+ | |
+ def _reconnect(self, wait=False, reset=True): | |
self._attempt += 1 | |
self.nextReconnectTime = None | |
if self.connected: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment