Skip to content

Commit

Permalink
Catch channel closed error on channel close
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Nov 16, 2017
1 parent f04d7bf commit 9cba5a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cis_interface/communication/RMQComm.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ def close_queue(self):
def close_channel(self):
r"""Close the channel if it exists."""
if self.channel:
self.channel.close()
try:
self.channel.close()
except pika.exceptions.ChannelClosed:
pass
self.channel = None

def close_connection(self):
Expand Down

0 comments on commit 9cba5a7

Please sign in to comment.