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.
  • Loading branch information
theacodes committed Sep 11, 2018
1 parent c0e996d commit 3ea88a5
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 3ea88a5

Please sign in to comment.