From: Hampus Wessman Date: Thu, 28 Jul 2011 09:20:42 +0000 (+0200) Subject: Fix crash when pipelining several blocking commands. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/64f201c2aa3b2d6618b5aa11a19e2b96e0450e87?hp=-c Fix crash when pipelining several blocking commands. --- 64f201c2aa3b2d6618b5aa11a19e2b96e0450e87 diff --git a/src/networking.c b/src/networking.c index 629267d1..7f9b96f7 100644 --- a/src/networking.c +++ b/src/networking.c @@ -793,6 +793,9 @@ int processMultibulkBuffer(redisClient *c) { void processInputBuffer(redisClient *c) { /* Keep processing while there is something in the input buffer */ while(sdslen(c->querybuf)) { + /* Immediately abort if the client is in the middle of something. */ + if (c->flags & REDIS_BLOCKED) return; + /* REDIS_CLOSE_AFTER_REPLY closes the connection once the reply is * written to the client. Make sure to not let the reply grow after * this flag has been set (i.e. don't process more commands). */