diff --git a/Kafka/Socket.php b/Kafka/Socket.php index 9ec92300..306c17ee 100644 --- a/Kafka/Socket.php +++ b/Kafka/Socket.php @@ -417,7 +417,7 @@ class Socket */ protected function isSocketDead() { - return $this->stream instanceof \Swoole\Coroutine\Socket && $this->stream->checkLiveness(); + return !$this->stream instanceof \Swoole\Coroutine\Socket || !$this->stream->checkLiveness(); } // }}}