Open boncey opened 5 years ago
This seems strange, and certainly not observed elsewhere.
Could you try switching to async-websocket from Celluloid? Would like to learn whether this is an asynchrony problem or a networking one.
I did that (I just changed the entry in the Gemfile
) and it seems to connect every time now.
I just did it 7 times in a row and it connected every time.
Ok, which means we have a real bug with Celluloid in this case. I'll leave this open, if you have time would love it if you could spend some more time debugging/adding log code/try/rescue, maybe we're not seeing an exception after the websocket connection is opened or something of that kind...
And if you are generous with your time, I would confirm whether this issue exists with EventMachine and with Celluloid on older versions of slack-ruby-client (especially in 0.13.x, 0.12.x).
My bot doesn't seem to connect to Slack around 50% of the time when I start it up. I get these lines every time...
But I only get this...
around half the time.
Here's some logging output.
Success...
Failure...
My config.ru start up code looks like this...
I'm not going via a proxy and as far as I can tell I have no network issues (the box lives in a data centre with excellent connectivity). I'm running the latest version.
My question is, is there a way to detect when this happens and try again? Also, is there something I can add to my app's healthcheck that tests my connectivity so I can try to reconnect?