Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Lita stops if Slack closes websocket #38

Closed
Igorshp opened this issue May 28, 2015 · 1 comment
Closed

Lita stops if Slack closes websocket #38

Igorshp opened this issue May 28, 2015 · 1 comment

Comments

@Igorshp
Copy link

Igorshp commented May 28, 2015

We've been having this problem for few months. Occasionally lita would simply 'crash' and stop working with no stacktrace.

I've traced it down to this:
https://github.com/kenjij/lita-slack/blob/master/lib/lita/adapters/slack/rtm_connection.rb#L48

It looks like when websocket gets closed upstream by Slack, the whole Eventloop gets stopped instead of retry.

Is this intended behaviour? Shouldn't connection be reopened?

@jimmycuadra
Copy link
Contributor

Yes, it's intended, though it should be documented better because it's not really obvious that this will happen. Lita will shut down cleanly if the connection is lost so that whatever init system/process manager is supervising the process can restart it in a clean state.

Not everyone agrees with this approach, so it's something that may be changed in the future. There's been some discussion at litaio/lita-hipchat#20 if you'd like to follow that. In the meantime, I'd be happy to accept a PR clarifying how this works in the project's README.

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

No branches or pull requests

2 participants