Skip to content

Commit 1784b1c

Browse files
authored
Ensure timeout is checked after each fetch position update in Consumer.position() (#2668)
1 parent f0fc1f2 commit 1784b1c

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)