diff options
author | Binbin <binloveplay1314@qq.com> | 2022-01-04 20:45:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 14:45:10 +0200 |
commit | c57e41c029ba45b0ebb3fdd9474e202cdef92767 (patch) | |
tree | 1627043175c273d294cf51d915e784d084b5f893 /README.md | |
parent | 747b08bee0cc1e481b9bd08acb881bc5b9ab18d9 (diff) | |
download | redis-c57e41c029ba45b0ebb3fdd9474e202cdef92767.tar.gz |
Print error messages in monitor/pubsub when errors occurs (#10050)
In monitor/pubsub mode, if the server closes the connection,
for example, use `CLIENT KILL`, redis-cli will exit directly
without printing any error messages.
This commit ensures that redis-cli will try to print the
error messages before exiting. Also there is a minor cleanup
for restart, see the example below.
before:
```
127.0.0.1:6379> monitor
OK
[root@ redis]#
127.0.0.1:6379> subscribe channel
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "channel"
3) (integer) 1
[root@ redis]#
127.0.0.1:6379> restart
127.0.0.1:6379> get keyUse 'restart' only in Lua debugging mode.
(nil)
```
after:
```
127.0.0.1:6379> monitor
OK
Error: Server closed the connection
[root@ redis]#
127.0.0.1:6379> subscribe channel
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "channel"
3) (integer) 1
Error: Server closed the connection
[root@ redis]#
127.0.0.1:6379> restart
Use 'restart' only in Lua debugging mode.
```
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions