Skip to content

Commit

Permalink
Fix race condition where pending Ack IDs can be modified by another t…
Browse files Browse the repository at this point in the history
…hread. (#5929)
  • Loading branch information
theacodes authored Sep 12, 2018
1 parent 001e897 commit f074335
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ def _get_initial_request(self):
# Any ack IDs that are under lease management need to have their
# deadline extended immediately.
if self._leaser is not None:
lease_ids = self._leaser.ack_ids
# Explicitly copy the list, as it could be modified by another
# thread.
lease_ids = list(self._leaser.ack_ids)
else:
lease_ids = []

Expand Down

0 comments on commit f074335

Please sign in to comment.