Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically reconnect after netsplit #294

Open
skizzerz opened this issue Jun 21, 2017 · 4 comments
Open

Automatically reconnect after netsplit #294

skizzerz opened this issue Jun 21, 2017 · 4 comments

Comments

@skizzerz
Copy link
Member

Right now we just leave the process hanging after a split when we detect a broken pipe error. This means you have to log into cli, Ctrl+C the process, and then start it up again. We should instead attempt to automatically reconnect on broken pipe:

  1. Perhaps have a grace or cooldown period where we wait before reconnecting, so that we don't flood the IRC server with connections in the event it's under a DOS or down. Also so we don't flood the error log.
  2. Dunno if we should reconnect in the same proc or if we should kill the proc and restart (aka internally issue an !frestart on a broken pipe)
@jacob1
Copy link
Member

jacob1 commented Jun 21, 2017

I was thinking of keeping the same process and just reconnecting to the server. That way, games or anything else going on would continue.
But in the case of an actual net split, the game is probably ruined ... so perhaps it should kill any running game after the restart (it's still the same process, so it could report who was what)

@kuzetsa
Copy link

kuzetsa commented Jun 21, 2017

https://gist.github.com/kuzetsa/5ab1adc2998913bd27d0e8247e7e8194

^ thanks, if this issues doesn't actually go away, should I open a new issue or comment on this one?


Edit / new remark:

Oh, this issue is theoretically going to be closed once there's some commits (and/or testing) to fix the problem, I think?

Either way is fine - just let me know if there's a preference for what should happen if there's further buggy "not sanely handling netsplits" etc. etc. etc.

@Fudster
Copy link
Contributor

Fudster commented Feb 7, 2018

Well i don't think it's just net splits.. I had mine ping out in the past it never did reconnect till I restarted it

@kuzetsa
Copy link

kuzetsa commented Feb 7, 2018

Can't debug what I'm no longer running / I won't follow up up on this github issue.
(haven't been running a bot in months due to lack of activity in the channel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants