Check connection before disconnect in rc_rmq
Compare changes
+ 4
− 3
@@ -100,9 +100,10 @@ class RCRMQ(object):
Naively calling disconnect() from RCRMQ will throw the following exception:
pika.exceptions.ChannelWrongStateError: Channel is closed.
To avoid this from happening, check the connection in the disconnect function.