1
0
mirror of https://github.com/fluencelabs/redis synced 2025-03-26 04:11:04 +00:00

RESP3: Allow any command in RESP3 Pub/Sub mode.

This commit is contained in:
antirez 2018-12-19 17:56:50 +01:00
parent a4f8f4a824
commit 9018388c3f

@ -2681,8 +2681,9 @@ int processCommand(client *c) {
return C_OK; return C_OK;
} }
/* Only allow SUBSCRIBE and UNSUBSCRIBE in the context of Pub/Sub */ /* Only allow a subset of commands in the context of Pub/Sub if the
if (c->flags & CLIENT_PUBSUB && * connection is in RESP2 mode. With RESP3 there are no limits. */
if ((c->flags & CLIENT_PUBSUB && c->resp == 2) &&
c->cmd->proc != pingCommand && c->cmd->proc != pingCommand &&
c->cmd->proc != subscribeCommand && c->cmd->proc != subscribeCommand &&
c->cmd->proc != unsubscribeCommand && c->cmd->proc != unsubscribeCommand &&