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

FR: Reconnect when the link is disconnected. #15

Closed
ikeji opened this issue Jan 24, 2015 · 9 comments
Closed

FR: Reconnect when the link is disconnected. #15

ikeji opened this issue Jan 24, 2015 · 9 comments

Comments

@ikeji
Copy link

ikeji commented Jan 24, 2015

Today, my bot was not respond to chat.
I checked the log and I found this line.

INFO: Disconnected from Slack.

I guess the lita-slack does not reconnect when the connection is lost.
Is there any way to reconnect to slack server?

@josqu4red
Copy link

Had the case a few times on my instance, just after a team_migration_started event.

@josacar
Copy link

josacar commented Jan 26, 2015

Maybe the simplest thing is shutdown the robot like this:

websocket.on(:close) { log.info("Disconnected from Slack."); robot.shut_down }

@jimmycuadra
Copy link
Contributor

Agreed. Reconnection should be handled by a process manager. What lita-slack should do is make sure the process shuts down correctly when the connection is lost.

@ikeji
Copy link
Author

ikeji commented Jan 30, 2015

Thanks a lot!!

@jimmycuadra
Copy link
Contributor

You're welcome! This was released in gem version 1.1.0.

@josacar
Copy link

josacar commented Jan 30, 2015

Thanks!

@reidblomquist
Copy link

@jimmycuadra why is it your opinion that this should be handled by a process manager instead of making this process bulletproof? as far as I know the IRC adapter can auto reconnect...

@jimmycuadra
Copy link
Contributor

If someone wants to implement auto-reconnection, I'd be happy to take a PR. See litaio/lita-hipchat#20 for a discussion on this topic in the HipChat adapter where people convinced me the plugin should do it.

@reidblomquist
Copy link

Awesome, thanks for the input @jimmycuadra - will read over your comments there and work on putting together a PR.

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

5 participants