From 713cc562750997ec6915baa36692cc73d8493db1 Mon Sep 17 00:00:00 2001 From: chenpz Date: Mon, 11 Jan 2021 14:15:30 +0800 Subject: [PATCH] fix read size limitation from a stream --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 7c7d7d5..5b5b235 100644 --- a/src/Client.php +++ b/src/Client.php @@ -53,7 +53,7 @@ public function send(CommandInterface $command): ResponseInterface */ public function read(): ResponseInterface { - $message = stream_get_line($this->resource, 2048, "\r\n"); + $message = explode("\r\n", fgets($this->resource))[0]; return new SonicResponse($message); }