Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure process_data_events returns #887

Merged
merged 2 commits into from Oct 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions pika/adapters/blocking_connection.py
Expand Up @@ -1616,6 +1616,9 @@ def _basic_consume_impl(self,
# If channel was closed, self._consumer_infos will be empty
if consumer_tag in self._consumer_infos:
del self._consumer_infos[consumer_tag]
# Schedule termination of connection.process_data_events using a
# negative channel number
self.connection._request_channel_dispatch(-self.channel_number)
raise

# NOTE: Consumer could get cancelled by broker immediately after opening
Expand Down Expand Up @@ -1719,6 +1722,9 @@ def basic_cancel(self, consumer_tag):
# NOTE: The entry could be purged if channel or connection closes
if consumer_tag in self._consumer_infos:
del self._consumer_infos[consumer_tag]
# Schedule termination of connection.process_data_events using a
# negative channel number
self.connection._request_channel_dispatch(-self.channel_number)

def _remove_pending_deliveries(self, consumer_tag):
"""Extract _ConsumerDeliveryEvt objects destined for the given consumer
Expand Down