Skip to content

Commit

Permalink
Add todo for handling these cases later on
Browse files Browse the repository at this point in the history
  • Loading branch information
midhunkrishna committed May 31, 2020
1 parent b45bf8d commit 298c345
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/muskrat/subscription_handler.rb
Expand Up @@ -63,6 +63,9 @@ def start_reader
with_reader_thread do
begin
read_from_mqtt
##
# TODO:
# Handle exceptions gracefully instead of blind rescue
rescue
@_mqtt_client.connect unless @_mqtt_client.connected?
##
Expand All @@ -84,6 +87,11 @@ def start_threadpool
@_mqtt_client.read_queue
)

##
# TODO:
# In case we reinstantiate a mqtt client object,
# the mqtt read queue would go out out of scope.

@_threadpool.start
end
end
Expand Down

0 comments on commit 298c345

Please sign in to comment.