Raku / whateverable

🤖 Different IRC bots that operate on a bunch of prebuilt Rakudo versions
https://gist.github.com/Whateverable
GNU Affero General Public License v3.0
18 stars 14 forks source link

The watchdog should work based on ping events #276

Open AlexDaniel opened 6 years ago

AlexDaniel commented 6 years ago

Basically, the watchdog ensures that bots are not stuck in some weird state. Currently it works like this: https://github.com/perl6/whateverable/blob/7f79d1d1d4cf4d791ad1fca0c0db0e41b6fc36fb/lib/Whateverable.pm6#L181-L185

In other words, someone must send a message to the channel every so often, otherwise bots commit mass suicide thinking that they're disconnected. One of the motivations for this feature is this bug: https://github.com/zoffixznet/perl6-IRC-Client/issues/40

Currently there's no way to handle pings in IRC::Client, so there's no better way to do that. I filed a feature request here: https://github.com/zoffixznet/perl6-IRC-Client/issues/50

That said, the issue is that sometimes nobody says anything for relatively long periods of time (more than 30 minutes). This forces us to have high timeouts, which is again less than awesome.