Merge pull request #7369 from oranagra/no_reject_watch

Avoid rejecting WATCH / UNWATCH, like MULTI/EXEC/DISCARD
This commit is contained in:
Salvatore Sanfilippo 2020-06-08 11:04:26 +02:00 committed by GitHub
commit 8183a4ca7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -776,11 +776,11 @@ struct redisCommand redisCommandTable[] = {
0,NULL,0,0,0,0,0,0},
{"watch",watchCommand,-2,
"no-script fast @transaction",
"no-script fast ok-loading ok-stale @transaction",
0,NULL,1,-1,1,0,0,0},
{"unwatch",unwatchCommand,1,
"no-script fast @transaction",
"no-script fast ok-loading ok-stale @transaction",
0,NULL,0,0,0,0,0,0},
{"cluster",clusterCommand,-2,
@ -3627,6 +3627,8 @@ int processCommand(client *c) {
c->cmd->proc != multiCommand &&
c->cmd->proc != execCommand &&
c->cmd->proc != discardCommand &&
c->cmd->proc != watchCommand &&
c->cmd->proc != unwatchCommand &&
!(c->cmd->proc == shutdownCommand &&
c->argc == 2 &&
tolower(((char*)c->argv[1]->ptr)[0]) == 'n') &&