From bcb930f4f94fbf408d9190df52a4eaf4561ecd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Kel=C4=8D=C3=A1k?= Date: Sat, 9 Sep 2023 15:13:53 +0200 Subject: [PATCH] Update CommandTrait.php --- src/Dashboards/Memcached/Compatibility/CommandTrait.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dashboards/Memcached/Compatibility/CommandTrait.php b/src/Dashboards/Memcached/Compatibility/CommandTrait.php index 2f0e3db..72a1aab 100644 --- a/src/Dashboards/Memcached/Compatibility/CommandTrait.php +++ b/src/Dashboards/Memcached/Compatibility/CommandTrait.php @@ -108,11 +108,12 @@ private function streamConnection(string $command, bool $array = false) { $buffer = ''; $data = []; + $start_time = time(); while (!feof($stream)) { $buffer .= fgets($stream, 256); - if ($this->checkCommandEnd($command, $buffer)) { + if ($this->checkCommandEnd($command, $buffer) || time() - $start_time > 60) { break; }