-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Conversation
Existing Botkit slackbot reconnect logic is failing. The retry attributes are passed along with the botkit object but slackbot_worker.js is looking for them in the bot object. Because these attributes do not exist the retry will always fail. There have been several issues opened against this problem and custom code has been written to try to manage the scenario with there is an RTM disconnect and the bot essentially dies for that team because it cannot reconnect. This fix points to the botkit object in slack_worker.js which then allows the retry logic to work as planned. Since making this change the bot will automatically reconnect and use the reconnect attributes that are used when the controller is initiated.
@benbrown This looks like the same change I have made in #514, looking for config vars on The docs specify passing But I think most people have been trying to pass their retry options into the controller or I'd propose changing convention so |
Looking forward to this. |
I agree @jonchurch those type of options belong at the controller level. However, for backwards compatibility and also to handle some multi-team bots, we should allow it to be passed in at the bot level too. I'll look int the code and see what needs to happen to make this mergable. |
OK! I did this in a slightly different way, but should be good to go. |
@gunar yes |
Existing Botkit slackbot reconnect logic is failing. The retry attributes are passed along with the botkit object but slackbot_worker.js is looking for them in the bot object. Because these attributes do not exist the retry will always fail. There have been several issues opened against this problem and custom code has been written to try to manage the scenario with there is an RTM disconnect and the bot essentially dies for that team because it cannot reconnect.
This fix points to the botkit object in slack_worker.js which then allows the retry logic to work as planned. Since making this change the bot will automatically reconnect and use the reconnect attributes that are used when the controller is initiated.