提交 9da6caac 编写于 作者: P Pieter Noordhuis

Don't reset the client when processCommand returns REDIS_ERR

上级 dc11daf3
......@@ -820,9 +820,13 @@ void processInputBuffer(redisClient *c) {
}
/* Multibulk processing could see a <= 0 length. */
if (c->argc > 0)
processCommand(c);
resetClient(c);
if (c->argc == 0) {
resetClient(c);
} else {
/* Only reset the client when the command was executed. */
if (processCommand(c) == REDIS_OK)
resetClient(c);
}
}
}
......
......@@ -955,7 +955,7 @@ int processCommand(redisClient *c) {
addReply(c,shared.queued);
} else {
if (server.vm_enabled && server.vm_max_threads > 0 &&
blockClientOnSwappedKeys(c,cmd)) return 1;
blockClientOnSwappedKeys(c,cmd)) return REDIS_ERR;
call(c,cmd);
}
return REDIS_OK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册