Skip to content

Commit

Permalink
Fix slack-ruby#78: ping thread terminates on a failed restart.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Sep 18, 2018
1 parent 861d974 commit ffed047
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/slack-ruby-bot-server/ping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def down!
@error_count += 1
return true if retries_left?
restart!
false
end

def restart!
Expand All @@ -80,8 +79,11 @@ def restart!
end
driver.close
driver.emit(:close, WebSocket::Driver::CloseEvent.new(1001, 'bot offline'))
false
rescue StandardError => e
logger.warn "Error restarting team #{owner.id}: #{e.message}."
logger.error e
true
end

def ping_interval
Expand Down

0 comments on commit ffed047

Please sign in to comment.