zenhack / irc-idler

IRC idler app for sandstorm
GNU General Public License v3.0
4 stars 2 forks source link

Fail more gracefully when multiple clients are "fighting" over login #23

Open zenhack opened 7 years ago

zenhack commented 7 years ago

I just had the following experience: I started up pidgin on my laptop, forgetting that I was signed in on my desktop. irc-idler then booted my desktop, because that's what it does when it gets a new connection. Then, my desktop tried to reconnect, which booted my laptop. rinse and repeat.

At some point, before I figured out what was happening, I rebooted the irc-idler, thinking it was hitting one of its more usual failure modes. This meant it had to reconnect to the server, and was no longer done with the handshake. Then, I started getting errors about excess floods, and the logs indicate that it was repeatedly reconnecting to the server as well.

This could happen if the new client connects before the server-side handhsake is finished; irc-idler will just drop everything and start over. So we repeatedly try to connect to the serer, and eventually it tells us to buzz off.

We should handle this more gracefully. Perhaps delay connecting to the server until we have the full user/nick/pass combo ready?

Ping-ponging the clients is something I'm willing to punt on, though eventually it might be nice to detect and handle this. But, we shouldn't cascade that to the server.

zenhack commented 7 years ago

Looks like I mis-interpreted what happened in my particular case; I was just banging into this:

https://developer.pidgin.im/ticket/11089

This is theoretically still a possiblity, though.