jaraco / irc

Full-featured Python IRC library for Python.
MIT License
390 stars 85 forks source link

Client gets stuck in disconnected state #123

Closed jaraco closed 7 years ago

jaraco commented 7 years ago

Lately with pmxbot, we're observing a condition where intermittently (about once a week) the client, a SingleServerIRCBot, will lose its connection to the server, and once in that state, any attempts to transmit messages results in a ServerNotConnectedError exception.

The server should probably respond more robustly under this condition, either automatically reconnecting or by documenting a recommendation for how a client implementation should handle this condition.

jaraco commented 7 years ago

The bot code at least advertises that the observed behavior shouldn't happen and it should reconnect automatically.

jaraco commented 7 years ago

Looking at the code, I see that there is support for reconnecting and that code depends on the scheduler, which was known to be bypassed until recently.

As a result, I expect the issue observed was not with IRC but was with its usage by pmxbot and is corrected in pmxbot now as well.