mirror of
https://github.com/redis/redis.git
synced 2026-06-03 13:43:41 -04:00
Merge pull request #6775 from SqREL/make-error-of-invalid-command-withing-context-explicit
Make error when submitting command in incorrect context more explicit
This commit is contained in:
commit
456bbc02c8
1 changed files with 4 additions and 1 deletions
|
|
@ -3498,7 +3498,10 @@ int processCommand(client *c) {
|
|||
c->cmd->proc != unsubscribeCommand &&
|
||||
c->cmd->proc != psubscribeCommand &&
|
||||
c->cmd->proc != punsubscribeCommand) {
|
||||
addReplyError(c,"only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context");
|
||||
addReplyErrorFormat(c,
|
||||
"'%s' command submitted, but only (P)SUBSCRIBE / "
|
||||
"(P)UNSUBSCRIBE / PING / QUIT allowed in this context",
|
||||
c->cmd->name);
|
||||
return C_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue