Skip to content

Commit

Permalink
Fix the app crashing when Slack doesn't connect. Yay for third party …
Browse files Browse the repository at this point in the history
…code.
  • Loading branch information
jc21 committed Jun 18, 2018
1 parent 125a98e commit 206074a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"objection": "^0.8.9",
"path": "^0.12.7",
"signale": "^1.1.0",
"slackbots": "git://github.com/jc21/slack-bot-api.git#proxy-support",
"slackbots": "git://github.com/jc21/slack-bot-api.git#juxtapose",
"winston": "^2.3.1"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions src/backend/internal/service_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ const internalServiceWorker = {
logger.success('Service #' + service.id + ' (slack) Connected');
});

obj.handler.on('error', function (err) {
logger.error('Service #' + service.id + ' (slack) ' + err);
});

obj.handler.on('close', function () {
obj.online = false;
logger.info('Service #' + service.id + ' (slack) Closed');
Expand Down

0 comments on commit 206074a

Please sign in to comment.