summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kafka/conn.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/kafka/conn.py b/kafka/conn.py
index bd399a9..d45b824 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -89,6 +89,9 @@ class BrokerConnection(local):
readable, _, _ = select([self._read_fd], [], [], timeout)
if not readable:
return None
+ if not self.in_flight_requests:
+ log.warning('No in-flight-requests to recv')
+ return None
correlation_id, response_type = self.in_flight_requests.popleft()
# Current implementation does not use size
# instead we read directly from the socket fd buffer