Fixing bug in Redisent causing Resque to ignore queue items larger than 1Kb.

This commit is contained in:
KevBurnsJr 2010-11-08 11:35:33 -08:00
parent 5fb34c3a90
commit 5fcd195db1

View File

@ -83,15 +83,15 @@ class Redisent {
break;
/* Bulk reply */
case '$':
if ($reply == '$-1') {
$response = null;
if ($reply == '$-1') {
break;
}
$read = 0;
$size = substr($reply, 1);
do {
$block_size = ($size - $read) > 1024 ? 1024 : ($size - $read);
$response = fread($this->__sock, $block_size);
$response .= fread($this->__sock, $block_size);
$read += $block_size;
} while ($read < $size);
fread($this->__sock, 2); /* discard crlf */