diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2018-12-04 18:09:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 18:09:43 +0100 |
commit | 430a987f4e6c7a011b0841042e4bf34ef7d4b19b (patch) | |
tree | 23c1aec9f45b5f23df79c57282cdc2c46440db9c | |
parent | 46a51cdcdc0bd92473163068c2ec3bef4dffe63c (diff) | |
parent | e2c1f80b464a3a6dde961bb30bff9a39c17c6b29 (diff) | |
download | redis-430a987f4e6c7a011b0841042e4bf34ef7d4b19b.tar.gz |
Merge pull request #5663 from madolson/dev_monitor_crash
Fixed a serverPanic when sending an invalid command to a monitor client
-rw-r--r-- | src/networking.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c index 7d387dabc..02d2a17ba 100644 --- a/src/networking.c +++ b/src/networking.c @@ -365,7 +365,7 @@ void addReplyErrorLength(client *c, const char *s, size_t len) { * Where the master must propagate the first change even if the second * will produce an error. However it is useful to log such events since * they are rare and may hint at errors in a script or a bug in Redis. */ - if (c->flags & (CLIENT_MASTER|CLIENT_SLAVE)) { + if (c->flags & (CLIENT_MASTER|CLIENT_SLAVE) && !(c->flags & CLIENT_MONITOR)) { char* to = c->flags & CLIENT_MASTER? "master": "replica"; char* from = c->flags & CLIENT_MASTER? "replica": "master"; char *cmdname = c->lastcmd ? c->lastcmd->name : "<unknown>"; |