Fix misleading comment (#8690)

REPLICAOF actually specifies which master to attach.
This commit is contained in:
hzzb 2021-03-25 10:39:31 +08:00 committed by GitHub
parent 600c15429e
commit 52ab829b73

View File

@ -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 "