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