From a66f622cf6a82a4cdfbc5011cba7c9c7fa1043e1 Mon Sep 17 00:00:00 2001 From: Konstantin Grachev Date: Sun, 31 Jan 2021 18:11:24 +0300 Subject: [PATCH] Expect heartbeat in checkIsOk --- src/Connection.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Connection.php b/src/Connection.php index 7b9041f..ada2107 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -164,6 +164,12 @@ abstract class Connection { $response = $this->readResponse(); + if ($response->isHeartBeat()) { + $this->command('NOP'); + + $response = $this->readResponse(); + } + if (!$response->isOk()) { throw new BadResponse($response); }