diff options
author | Dana Powers <dana.powers@rd.io> | 2015-12-10 18:40:11 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2015-12-10 18:40:11 -0800 |
commit | f86068a51a50dcd472d2c5ddf62fc61545e7f173 (patch) | |
tree | dfcbe8f187daac3dba25d5a8f166a7c369e1b9a2 /kafka/conn.py | |
parent | 06e1b0329d0304b0fab3eaad9799f9f9967271f5 (diff) | |
download | kafka-python-f86068a51a50dcd472d2c5ddf62fc61545e7f173.tar.gz |
Check for no in-flight-requests in BrokerConnection.recv
Diffstat (limited to 'kafka/conn.py')
-rw-r--r-- | kafka/conn.py | 3 |
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 |