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 6c1b4b3905
commit c0d6c9a0c1

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;
}