BLPOPping clients are no longer subject to connection timeouts, fixing issues 155

This commit is contained in:
antirez 2010-08-24 12:10:59 +02:00
parent 01daeecee7
commit e452436a07

View File

@ -466,6 +466,7 @@ void closeTimedoutClients(void) {
if (server.maxidletime && if (server.maxidletime &&
!(c->flags & REDIS_SLAVE) && /* no timeout for slaves */ !(c->flags & REDIS_SLAVE) && /* no timeout for slaves */
!(c->flags & REDIS_MASTER) && /* no timeout for masters */ !(c->flags & REDIS_MASTER) && /* no timeout for masters */
!(c->flags & REDIS_BLOCKED) && /* no timeout for BLPOP */
dictSize(c->pubsub_channels) == 0 && /* no timeout for pubsub */ dictSize(c->pubsub_channels) == 0 && /* no timeout for pubsub */
listLength(c->pubsub_patterns) == 0 && listLength(c->pubsub_patterns) == 0 &&
(now - c->lastinteraction > server.maxidletime)) (now - c->lastinteraction > server.maxidletime))