Skip to content

Commit b7fde15

Browse files
committed
Suppress warning from Async::Wrapper::Cancelled and handle and log all other errors.
1 parent c99043b commit b7fde15

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.rubocop_todo.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2019-07-21 10:11:39 -0400 using RuboCop version 0.61.1.
3+
# on 2019-07-21 18:39:19 -0400 using RuboCop version 0.61.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -13,10 +13,11 @@ Lint/AssignmentInCondition:
1313
- 'lib/slack/real_time/concurrency/async.rb'
1414
- 'lib/slack/real_time/socket.rb'
1515

16-
# Offense count: 4
16+
# Offense count: 5
1717
Lint/HandleExceptions:
1818
Exclude:
1919
- 'lib/slack-ruby-client.rb'
20+
- 'lib/slack/real_time/concurrency/async.rb'
2021
- 'spec/slack/real_time/concurrency/celluloid_spec.rb'
2122
- 'spec/slack/real_time/concurrency/eventmachine_spec.rb'
2223

lib/slack/real_time/concurrency/async.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def start_reactor(client)
4949
client.run_loop
5050
rescue ::Async::Wrapper::Cancelled => e
5151
# Will get restarted by ping worker.
52-
client.logger.warn(subtask.to_s) { e.message }
52+
rescue StandardError => e
53+
client.logger.error(subtask.to_s) { e.message }
5354
end
5455
end
5556

0 commit comments

Comments
 (0)