Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a5487309
Commit
a5487309
authored
Dec 04, 2018
by
Madelyn Olson
Committed by
antirez
Dec 04, 2018
Browse files
Fixed a serverPanic when sending an invalid command to a monitor client
parent
1637522f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
a5487309
...
@@ -365,7 +365,7 @@ void addReplyErrorLength(client *c, const char *s, size_t len) {
...
@@ -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
* 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
* 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. */
* 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
*
to
=
c
->
flags
&
CLIENT_MASTER
?
"master"
:
"replica"
;
char
*
from
=
c
->
flags
&
CLIENT_MASTER
?
"replica"
:
"master"
;
char
*
from
=
c
->
flags
&
CLIENT_MASTER
?
"replica"
:
"master"
;
char
*
cmdname
=
c
->
lastcmd
?
c
->
lastcmd
->
name
:
"<unknown>"
;
char
*
cmdname
=
c
->
lastcmd
?
c
->
lastcmd
->
name
:
"<unknown>"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment