提交 1580a378 编写于 作者: D Dov Murik 提交者: antirez

redis-cli: fix prompt after shutdown command

Fix redis-cli prompt to state "not connected" after a SHUTDOWN command
is sent.
上级 46784846
......@@ -517,8 +517,11 @@ static int cliReadReply(int output_raw_strings) {
int output = 1;
if (redisGetReply(context,&_reply) != REDIS_OK) {
if (config.shutdown)
if (config.shutdown) {
redisFree(context);
context = NULL;
return REDIS_OK;
}
if (config.interactive) {
/* Filter cases where we should reconnect */
if (context->err == REDIS_ERR_IO && errno == ECONNRESET)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册