Don't assume a reconnect timer event will always have connection_params
This commit is contained in:
parent
76d9face44
commit
99c2147512
1 changed files with 2 additions and 1 deletions
|
@ -130,7 +130,8 @@ class Bot(object):
|
|||
del self.servers[server.fileno()]
|
||||
|
||||
def _timed_reconnect(self, event: EventManager.Event):
|
||||
if not self.reconnect(event["server_id"], event["connection_params"]):
|
||||
if not self.reconnect(event["server_id"],
|
||||
event.get("connection_params", None)):
|
||||
event["timer"].redo()
|
||||
def reconnect(self, server_id: int, connection_params: typing.Optional[
|
||||
utils.irc.IRCConnectionParameters]=None) -> bool:
|
||||
|
|
Loading…
Reference in a new issue