Skip to content

Commit

Permalink
resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Sep 17, 2022
1 parent e188819 commit cfd338f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/redis_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4182,17 +4182,12 @@ class CommandHello final : public Commander {
auto authResult = AuthenticateUser(conn, svr->GetConfig(), user_password);
switch (authResult) {
case AuthResult::INVALID_PASSWORD:
*output = Redis::Error("ERR invalid password");
break;
return Status(Status::NotOK, "invalid password");
case AuthResult::NO_REQUIRE_PASS:
*output = Redis::Error("ERR Client sent AUTH, but no password is set");
break;
return Status(Status::NotOK, "Client sent AUTH, but no password is set");
case AuthResult::OK:
break;
}
if (authResult != AuthResult::OK) {
return Status::OK();
}
next_arg += 1;
} else if (opt == "SETNAME" && moreargs != 0) {
const std::string& name = args_[next_arg + 1];
Expand Down
2 changes: 1 addition & 1 deletion src/redis_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,4 @@ void Connection::ResetMultiExec() {
DisableFlag(Connection::kMultiExec);
}

} // namespace Redis
}

0 comments on commit cfd338f

Please sign in to comment.