Skip to content

Commit

Permalink
Merge pull request #196 from fitnub-bosbud/main
Browse files Browse the repository at this point in the history
Fix default behavior of hanging without entering reconnection strategy
  • Loading branch information
jaraco authored Jul 15, 2022
2 parents e3bc839 + 4afed88 commit 96cf340
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v20.1.0
=======

* #196: In irc.bot, avoid hanging idle when the first connection
attempt fails.

v20.0.0
=======

Expand Down
4 changes: 3 additions & 1 deletion irc/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ def _connect(self):
**self.__connect_params,
)
except irc.client.ServerConnectionError:
pass
self.connection._handle_event(
irc.client.Event("disconnect", self.connection.server, "", [""])
)

def _on_disconnect(self, connection, event):
self.channels = IRCDict()
Expand Down

0 comments on commit 96cf340

Please sign in to comment.