提交 b5f52bf0 编写于 作者: V Vasyl Melnychuk

Make error when submitting command in incorrect context more explicit

So error message `ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context` will become
`ERR 'get' command submitted, but only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context`
上级 8105f91a
...@@ -3498,7 +3498,10 @@ int processCommand(client *c) { ...@@ -3498,7 +3498,10 @@ int processCommand(client *c) {
c->cmd->proc != unsubscribeCommand && c->cmd->proc != unsubscribeCommand &&
c->cmd->proc != psubscribeCommand && c->cmd->proc != psubscribeCommand &&
c->cmd->proc != punsubscribeCommand) { 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; return C_OK;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册