Skip to content

Commit

Permalink
redis-cli: fix prompt after shutdown command
Browse files Browse the repository at this point in the history
Fix redis-cli prompt to state "not connected" after a SHUTDOWN command
is sent.
  • Loading branch information
Dov Murik authored and antirez committed Aug 18, 2014
1 parent d786fb6 commit 233d24a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/redis-cli.c
Expand Up @@ -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)
Expand Down

0 comments on commit 233d24a

Please sign in to comment.