Skip to content

Commit

Permalink
Update streaming_pull_manager.py to address NoneType
Browse files Browse the repository at this point in the history
A fix for #1238
  • Loading branch information
githubwua authored Aug 27, 2024
1 parent 7cf2d11 commit a33f49c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,12 @@ def _shutdown(self, reason: Any = None) -> None:
assert self._leaser is not None
self._leaser.stop()

total = len(dropped_messages) + len(
if dropped_messages is not None:
total = len(dropped_messages)
else:
total = 0

total = total + len(
self._messages_on_hold._messages_on_hold
)
_LOGGER.debug(f"NACK-ing all not-yet-dispatched messages (total: {total}).")
Expand Down

0 comments on commit a33f49c

Please sign in to comment.