Fix misleading comment (#8690)
REPLICAOF actually specifies which master to attach.
This commit is contained in:
parent
600c15429e
commit
52ab829b73
@ -2773,7 +2773,7 @@ void replicaofCommand(client *c) {
|
|||||||
if ((getLongFromObjectOrReply(c, c->argv[2], &port, NULL) != C_OK))
|
if ((getLongFromObjectOrReply(c, c->argv[2], &port, NULL) != C_OK))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Check if we are already attached to the specified slave */
|
/* Check if we are already attached to the specified master */
|
||||||
if (server.masterhost && !strcasecmp(server.masterhost,c->argv[1]->ptr)
|
if (server.masterhost && !strcasecmp(server.masterhost,c->argv[1]->ptr)
|
||||||
&& server.masterport == port) {
|
&& server.masterport == port) {
|
||||||
serverLog(LL_NOTICE,"REPLICAOF would result into synchronization "
|
serverLog(LL_NOTICE,"REPLICAOF would result into synchronization "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user