Skip to content

Commit

Permalink
client kill all parameter should be 3
Browse files Browse the repository at this point in the history
  • Loading branch information
gukj-spel committed Aug 5, 2024
1 parent 3f092e9 commit 2cfd085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ CmdClientKill::CmdClientKill(const std::string& name, int16_t arity)
: BaseCmd(name, arity, kCmdFlagsAdmin, kAclCategoryAdmin) {}

bool CmdClientKill::DoInitial(PClient* client) {
if (strcasecmp(client->argv_[2].data(), "all") == 0) {
if (client->argv_.size() == 3 && strcasecmp(client->argv_[2].data(), "all") == 0) {
kill_type_ = Type::ALL;
return true;
} else if (client->argv_.size() == 4 && strcasecmp(client->argv_[2].data(), "addr") == 0) {
Expand Down

0 comments on commit 2cfd085

Please sign in to comment.