From 5fcd195db16c181837d14a87043bf172555d277d Mon Sep 17 00:00:00 2001 From: KevBurnsJr Date: Mon, 8 Nov 2010 11:35:33 -0800 Subject: [PATCH] Fixing bug in Redisent causing Resque to ignore queue items larger than 1Kb. --- lib/Redisent/Redisent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Redisent/Redisent.php b/lib/Redisent/Redisent.php index 0b9ea6e..7c7f33b 100644 --- a/lib/Redisent/Redisent.php +++ b/lib/Redisent/Redisent.php @@ -83,15 +83,15 @@ class Redisent { break; /* Bulk reply */ case '$': + $response = null; if ($reply == '$-1') { - $response = null; 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 */