Skip to content

redis-cli: fix prompt after shutdown command #851

Closed
wants to merge 1 commit into from

3 participants

@dubek
dubek commented Dec 26, 2012

Fix redis-cli prompt to state not connected after a SHUTDOWN command is sent.

Original scenario (before fix):

redis 127.0.0.1:6379> KEYS *
1) "aaa"
redis 127.0.0.1:6379> SHUTDOWN
redis 127.0.0.1:6379> KEYS *
redis 127.0.0.1:6379> GET aaa
redis 127.0.0.1:6379> 

Same scenario after redis-cli fix:

redis 127.0.0.1:6379> KEYS *
1) "aaa"
redis 127.0.0.1:6379> SHUTDOWN
not connected> KEYS *
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected> GET aaa
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected> 
Dov Murik redis-cli: fix prompt after shutdown command
Fix redis-cli prompt to state "not connected" after a SHUTDOWN command
is sent.
39e04e4
@moreaki

In my humble opinion a very useful patch and probably the intended invariant of SHUTDOWN on the CLI part. I have just verified it with the newest unstable branch. Do you mind rebasing your patch (I haven't tested if git still applies it, though it should)?

@antirez: I believe this should be merged.

@mattsta
mattsta commented Oct 16, 2014

Fixed in 233d24a

@mattsta mattsta closed this Oct 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.