Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Ignores socket errors that occur during shut_down
Browse files Browse the repository at this point in the history
If the socket has already disconnected, e.g., we don't want to raise _another_
error (see #34, #20) when trying to close it cleanly.
  • Loading branch information
alindeman committed Feb 21, 2016
1 parent 9a11d47 commit f6ab143
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/lita/adapters/hipchat/connector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def set_topic(room_jid, topic)
def shut_down
Lita.logger.info("Disconnecting from HipChat.")
client.close
rescue IOError, SystemCallError => e
Lita.logger.warn("Encountered error during disconnect: #{e}")
end

private
Expand Down

0 comments on commit f6ab143

Please sign in to comment.