mirror of
https://github.com/predis/predis.git
synced 2026-10-21 19:26:24 +00:00
Use a faster method to detect errors when reading a line from the server.
This commit is contained in:
+1
-1
@@ -1449,7 +1449,7 @@ class TcpConnection extends Connection implements IConnectionSingle {
|
||||
$value = '';
|
||||
do {
|
||||
$chunk = fgets($socket);
|
||||
if ($chunk === false || strlen($chunk) == 0) {
|
||||
if ($chunk === false || $chunk === '') {
|
||||
$this->onCommunicationException('Error while reading line from the server');
|
||||
}
|
||||
$value .= $chunk;
|
||||
|
||||
Reference in New Issue
Block a user