Skip to content

Commit f77a2fb

Browse files
k61ndpkp
authored andcommitted
Ensure timeout is checked after each fetch position update in Consumer.position() (#2668)
1 parent 94d620e commit f77a2fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/consumer/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ def position(self, partition, timeout_ms=None):
757757
# batch update fetch positions for any partitions without a valid position
758758
if self._update_fetch_positions(timeout_ms=timer.timeout_ms):
759759
position = self._subscription.assignment[partition].position
760-
elif timer.expired:
760+
if timer.expired:
761761
return None
762762
else:
763763
return position.offset

0 commit comments

Comments
 (0)