diff --git a/lib/Redisent/Redisent.php b/lib/Redisent/Redisent.php index 92ccd02..de393cd 100644 --- a/lib/Redisent/Redisent.php +++ b/lib/Redisent/Redisent.php @@ -114,11 +114,11 @@ function __call($name, $args) { } $read = 0; $size = substr($reply, 1); - do { + while ($read < $size) { $block_size = ($size - $read) > 1024 ? 1024 : ($size - $read); $response .= fread($this->__sock, $block_size); $read += $block_size; - } while ($read < $size); + } fread($this->__sock, 2); /* discard crlf */ break; /* Multi-bulk reply */