From 5265b4afe1c9872901389443061a4abd90ede761 Mon Sep 17 00:00:00 2001 From: liutao Date: Wed, 14 Jan 2026 16:33:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ping=E5=90=8C=E6=97=B6=E4=B8=8D=E8=B0=83?= =?UTF-8?q?=E7=94=A8recv=E6=96=B9=E6=B3=95=E6=8E=A5=E5=8F=97=E6=B6=88?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E9=81=BF=E5=85=8D=E6=B6=88=E6=81=AF=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BaseClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BaseClient.php b/src/BaseClient.php index 1f7f744..65f881e 100644 --- a/src/BaseClient.php +++ b/src/BaseClient.php @@ -326,7 +326,7 @@ public function publish( public function ping() { - return $this->send(['type' => Protocol\Types::PINGREQ]); + return $this->send(['type' => Protocol\Types::PINGREQ], false); } public function close(int $code = ReasonCode::NORMAL_DISCONNECTION, array $properties = []): bool From 40160112e0910f2a9d233047891ce7bf5eb5d35f Mon Sep 17 00:00:00 2001 From: liutao Date: Wed, 14 Jan 2026 18:22:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ping=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=82=E6=95=B0=EF=BC=8C=E6=8E=A7=E5=88=B6=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E8=B0=83=E7=94=A8recv=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BaseClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BaseClient.php b/src/BaseClient.php index 65f881e..bf6c20c 100644 --- a/src/BaseClient.php +++ b/src/BaseClient.php @@ -324,9 +324,9 @@ public function publish( ); } - public function ping() + public function ping(bool $response = true) { - return $this->send(['type' => Protocol\Types::PINGREQ], false); + return $this->send(['type' => Protocol\Types::PINGREQ], $response); } public function close(int $code = ReasonCode::NORMAL_DISCONNECTION, array $properties = []): bool