WritheM / Wallace

https://plug.dj/writhem-radio
Other
4 stars 3 forks source link

Reconnect on disconnect #23

Closed pironic closed 9 years ago

pironic commented 9 years ago

when the bot is disconnected from the websocket we need to reconnect.

two reasons it could be disconnected:

here is a screenshot of connected elsewhere: image

pironic commented 9 years ago

image maintenance screen cap

ylt commented 9 years ago

Might take a little work to implement the disconnects cleanly - might be best to just throw in a try/catch for now and trigger a restart of itself. Will require changes to the bot core to allow for restarts.

pironic commented 9 years ago

agreed/understood. i'd like to implement a 2 min timeout and re-try to connect to the websocket when it dies for any reason.

ylt commented 9 years ago

Probably best to make it progressively longer, so that the first reconnect is instant, second is in 30 seconds, third is a minute, etc up to maybe 5 mins as the cap

pironic commented 9 years ago

we get a nice little warning too: image

pironic commented 9 years ago

a reconnect and a new session see different errors. we'll need to handle both:

image

pironic commented 9 years ago

arguably the batch file commit via c1f3c7a46b4be973cd3f634625c69d72c9693c4b was a fix for this, however we should still do this via the real code and not just restarting it when it crashes.

ylt commented 9 years ago

of course, but in its current state is probably still more stable than basicbot - think priority should be getting the basicbot feature-set across first

pironic commented 9 years ago

agreed. moved to 1.0.

0.1 was a miss-click.

ylt commented 9 years ago

Going to be resolved as part of #44.