diff --git a/coolamqp/attaches/consumer.py b/coolamqp/attaches/consumer.py index 26a43302b47147709753d6dee9512f6ee4078706..d08bc496346ac691c89a2d17f3f7fecd4d52f70d 100644 --- a/coolamqp/attaches/consumer.py +++ b/coolamqp/attaches/consumer.py @@ -192,7 +192,6 @@ class Consumer(Channeler): self.method_and_watch(BasicCancel(self.consumer_tag, False), [BasicCancelOk], self.on_close) - self.channel_close_sent = True else: if not self.channel_close_sent and self.state == ST_ONLINE: self.method(ChannelClose(0, b'cancelling', 0, 0)) diff --git a/coolamqp/attaches/publisher.py b/coolamqp/attaches/publisher.py index e343594e0e26ea87de189dc8a49983a8410f0fa6..a3f1aa084759e171b9a19e60581f69e2a2d8ec54 100644 --- a/coolamqp/attaches/publisher.py +++ b/coolamqp/attaches/publisher.py @@ -65,6 +65,12 @@ class Publisher(Channeler, Synchronized): Since this may be called by other threads than ListenerThread, this has locking. _pub and on_fail are synchronized so that _pub doesn't see a partially destroyed class. + + :param mode: Publishing mode to use. One of: + MODE_NOACK - use non-ack mode + MODE_CNPUB - use consumer publishing mode. A switch to MODE_TXPUB will be made + if broker does not support these. + :raise ValueError: mode invalid """ MODE_NOACK = 0 # no-ack publishing MODE_CNPUB = 1 # RabbitMQ publisher confirms extension @@ -76,14 +82,6 @@ class Publisher(Channeler, Synchronized): """This publisher will never work (eg. MODE_CNPUB on a broker not supporting publisher confirms)""" def __init__(self, mode): - """ - Create a new publisher - :param mode: Publishing mode to use. One of: - MODE_NOACK - use non-ack mode - MODE_CNPUB - use consumer publishing mode. A switch to MODE_TXPUB will be made - if broker does not support these. - :raise ValueError: mode invalid - """ Channeler.__init__(self) Synchronized.__init__(self)