diff --git a/lib/Predis/Connection/PhpiredisStreamConnection.php b/lib/Predis/Connection/PhpiredisStreamConnection.php index 22f45dba..1bb43421 100644 --- a/lib/Predis/Connection/PhpiredisStreamConnection.php +++ b/lib/Predis/Connection/PhpiredisStreamConnection.php @@ -141,7 +141,7 @@ class PhpiredisStreamConnection extends StreamConnection $reader = $this->reader; while (PHPIREDIS_READER_STATE_INCOMPLETE === $state = phpiredis_reader_get_state($reader)) { - $buffer = fread($socket, 4096); + $buffer = stream_socket_recvfrom($socket, 4096); if ($buffer === false || $buffer === '') { $this->onConnectionError('Error while reading bytes from the server.');