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

RTM connections timeout and don't restart #48

Open
colestrode opened this issue Mar 18, 2017 · 0 comments
Open

RTM connections timeout and don't restart #48

colestrode opened this issue Mar 18, 2017 · 0 comments

Comments

@colestrode
Copy link
Member

I've observed this on single-team bots, but I'm sure this would affect Slack apps as well. After some time, the RTM connection times out, I believe because the pong response doesn't come back after a timeout. This is the error logged:

Error: Stale RTM connection, closing RTM
    at Timeout.pinger [as _onTimeout] (/Users/cfurfarostrode/src/projects/pizza-bot/node_modules/botkit/lib/Slackbot_worker.js:182:35)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)

It would be good to catch that error and try to reconnect. If we can't reconnect, exit (if single team bot and option is set) or at the very least log something out in the logs. It would be good to include any team information we have, though we might not have any in that error.

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

No branches or pull requests

1 participant