Unverified Commit 4a2c4477 authored by hzzb's avatar hzzb Committed by GitHub
Browse files

Fix misleading comment (#8690)

REPLICAOF actually specifies which master to attach.
parent 98d2e001
...@@ -2773,7 +2773,7 @@ void replicaofCommand(client *c) { ...@@ -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 "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment