Skip to content

Commit 68d67e4

Browse files
committed
Ensure timeout is checked after each fetch position update in Consumer.position()
1 parent 512d0a0 commit 68d67e4

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
@@ -781,7 +781,7 @@ def position(self, partition, timeout_ms=None):
781781
# batch update fetch positions for any partitions without a valid position
782782
if self._update_fetch_positions(timeout_ms=timer.timeout_ms):
783783
position = self._subscription.assignment[partition].position
784-
elif timer.expired:
784+
if timer.expired:
785785
return None
786786
else:
787787
return position.offset

0 commit comments

Comments
 (0)