Fix duplicated CLIENT SETNAME reply.

Happened when we set the name to "" to cancel the name.
Was introduced during the RESP3 refactoring.

See #6036.
This commit is contained in:
antirez 2019-12-29 15:44:59 +01:00
parent faea46710c
commit 6e4f70b817

View File

@ -1998,7 +1998,6 @@ int clientSetNameOrReply(client *c, robj *name) {
if (len == 0) {
if (c->name) decrRefCount(c->name);
c->name = NULL;
addReply(c,shared.ok);
return C_OK;
}