jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 87 forks source link

Connection timeout #94

Closed andycoates closed 8 years ago

andycoates commented 8 years ago

Hey,

I'm using irc.bot.SingleServerIRCBot and would like to set a timeout/retry for connections - any simple way of doing that? At the moment if I start() and the server is down, it just seems to hang indefinitely, even if the server comes back up.

Thanks.

jaraco commented 8 years ago

There is an option to send keepalive pings which will trigger errors and reconnect attempts, but I think that solves a different problem than the one you're trying to solve. I don't think there's any built-in functionality to solve the condition you require. A pull request implementing such functionality would be welcomed.

jaraco commented 8 years ago

I welcome contributions to enhance the functionality, especially ones that include tests and are backward-compatible.