See https://github.com/redis/redis/blob/f4549d1cf4830c0584f8e41369a8628842a67aec/src/replication.c#L3241: ```c if (slaveIsInHandshakeState()) { slavestate = "handshake"; } else { switch(server.repl_state) { case REPL_STATE_NONE: slavestate = "none"; break; case REPL_STATE_CONNECT: slavestate = "connect"; break; case REPL_STATE_CONNECTING: slavestate = "connecting"; break; case REPL_STATE_TRANSFER: slavestate = "sync"; break; case REPL_STATE_CONNECTED: slavestate = "connected"; break; default: slavestate = "unknown"; break; } } ```