From 6029e2cb7f9e1447634335754fec0cb1467919de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 9 Oct 2020 17:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kafka/Socket.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } // }}}