diff --git a/ircbot/bot.py b/ircbot/bot.py index 1a92846..2c27d35 100644 --- a/ircbot/bot.py +++ b/ircbot/bot.py @@ -412,8 +412,7 @@ class IRCBot(irc.client.SimpleIRCClient): def _connected_checker(self): if not self.connection.is_connected(): - self.connection.execute_delayed(self.reconnection_interval, - self._connected_checker) + self.reactor.scheduler.execute_after(self.reconnection_interval, self._connected_checker) self.jump_server() def _connect(self): @@ -431,8 +430,7 @@ class IRCBot(irc.client.SimpleIRCClient): def _on_disconnect(self, c, e): self.channels = IRCDict() - self.connection.execute_delayed(self.reconnection_interval, - self._connected_checker) + self.reactor.scheduler.execute_after(self.reconnection_interval, self._connected_checker) def _on_join(self, c, e): ch = e.target