Reconnect not working
See original GitHub issueHi! I added a listener for the ‘close’ event in order to handle disconnections. I’m seeing the message in the logs but the bot is offline now. What I’m doing wrong? Thanks!
// handle disconnections
bot.on('close', function(data){
console.log("Connection closed... Reconnecting.")
bot.login();
});
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:14 (1 by maintainers)
Top Results From Across the Web
League of Legends Reconnect Loop Bug - 2022 Fix
In this tutorial, we'll walk through how you can get past the Reconnect loop in League of Legends.
Read more >Reconnect feature not working : r/apexlegends - Reddit
Reconnect feature not working. Every time i get a connection time- out, It doesn't let me reconnect. I get an error code, then...
Read more >How To Fix League Of Legends Reconnect Error | NEW in 2022
Solution #4: Restart the router. ... In case there's a minor bug in your network, another troubleshooting step that you can consider doing...
Read more >Fix a "Reconnect me" error - Android - Chromecast Help
Step 1. Check the internet access · If the network is online and the issue gets fixed after you reboot the router, then...
Read more >Reconnect is not working anymore - Answers HQ
It is pretty strange that it wouldn't even attempt to reconnect you. Have you been able to try any sort of troubleshooting at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Shouldn’t this be a part of the library itself?
I don’t know if this is still relevant, but I fixed this problem by adding to the source code a reconnect method. I was told by Slack Help Center that this is normal, and that simply what you need to do is call a method on the api to tell Slack that your app is still running. The reconnect method simply calls the method on the real time messaging api (rtm.connect) which to my understanding sends over a new url to set as your web socket. My pull request didn’t go through due to some weird error, and it doesn’t seem like anyone is still keeping tabs on this repository. For more clarification take a look at the slack-api documentation here: https://api.slack.com/methods/rtm.connect