diff options
author | Dana Powers <dana.powers@gmail.com> | 2017-03-03 17:51:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-03 17:51:48 -0800 |
commit | 61eb396bba268f892a657b2e4d7bd813aabc88ec (patch) | |
tree | c5f55bad0ab1b8085119d8690b197b07a360318b | |
parent | c741c5342e8fbf682d6b2811ecde4f1b0491a655 (diff) | |
download | kafka-python-61eb396bba268f892a657b2e4d7bd813aabc88ec.tar.gz |
When closing a broker connection without error, fail in-flight-requests with Cancelled (#1010)
-rw-r--r-- | kafka/conn.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 8f4fefe..ab86804 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -511,7 +511,7 @@ class BrokerConnection(object): self._rbuffer.seek(0) self._rbuffer.truncate() if error is None: - error = Errors.ConnectionError(str(self)) + error = Errors.Cancelled(str(self)) while self.in_flight_requests: ifr = self.in_flight_requests.popleft() ifr.future.failure(error) |