Skip to content

Commit

Permalink
do not close connection when auth failed
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelMaker committed Nov 3, 2016
1 parent 558c8ca commit 9be90c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pika_client_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ std::string PikaClientConn::DoCmd(const std::string& opt) {

// Check authed
if (!auth_stat_.IsAuthed(cinfo_ptr)) {
LOG(WARNING) << "(" << ip_port() << ")Authentication required, close connection";
LOG(WARNING) << "(" << ip_port() << ")Authentication required";
return "-ERR NOAUTH Authentication required.\r\n";
}

Expand Down Expand Up @@ -124,7 +124,7 @@ std::string PikaClientConn::DoCmd(const std::string& opt) {

if (opt == kCmdNameAuth) {
if(!auth_stat_.ChecknUpdate(c_ptr->res().raw_message())) {
LOG(WARNING) << "(" << ip_port() << ")Wrong Password, close connection";
LOG(WARNING) << "(" << ip_port() << ")Wrong Password";
}
}
return c_ptr->res().message();
Expand Down

0 comments on commit 9be90c3

Please sign in to comment.