summaryrefslogtreecommitdiff
path: root/kafka/client_async.py
diff options
context:
space:
mode:
authorBuğra Gedik <bgedik@gmail.com>2018-01-23 09:49:18 -0800
committerDana Powers <dana.powers@gmail.com>2018-01-23 09:49:18 -0800
commitbfa6e2044ad7ecef8ab042d43e2c4d47467d3949 (patch)
tree38a5209ae543173bfd3f8bc63dc73e30141df1fa /kafka/client_async.py
parent8f8201713676db2f6ea3828cc376cbed2665dcd2 (diff)
downloadkafka-python-bfa6e2044ad7ecef8ab042d43e2c4d47467d3949.tar.gz
Remove assertion with side effect (#1348)
Diffstat (limited to 'kafka/client_async.py')
-rw-r--r--kafka/client_async.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py
index 29cb8c0..2e78e3b 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -852,8 +852,8 @@ class KafkaClient(object):
def wakeup(self):
with self._wake_lock:
try:
- assert self._wake_w.send(b'x') == 1
- except (AssertionError, socket.error):
+ self._wake_w.sendall(b'x')
+ except socket.error:
log.warning('Unable to send to wakeup socket!')
def _clear_wake_fd(self):