Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
proton-c-0.29.0
-
None
-
Patch
Description
def unsubscribe(self, consumer): if consumer in self.consumers: self.consumers.remove(consumer) return len(self.consumers) == 0 and (self.dynamic or self.queue.count == 0)
Here, self.queue.count == 0 can never be True (because method reference != integer). This means that broker will never drop the Queue object.
Functionality wise, the impact of this is insignificant, given the uses of the code (stand-in for real broker when running simple messaging examples).
It has compatibility implications, however, because self.queue.count is a Python 2.7 addition and on Python 2.6 accessing undefined property will raise exception and crash the broker.
Attachments
Issue Links
- links to