diff --git a/kafka/client_async.py b/kafka/client_async.py index 29cb8c0fc..2e78e3b3a 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -852,8 +852,8 @@ def check_version(self, node_id=None, timeout=2, strict=False): 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):