diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/sasl_protocol.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/sasl_protocol.cc index 49abe5899a..3d40c0fd6a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/sasl_protocol.cc +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/sasl_protocol.cc @@ -87,6 +87,7 @@ void SaslProtocol::Authenticate(std::function connection = connection_.lock(); if (!connection) { + AuthComplete(Status::AuthenticationFailed("Lost RPC Connection"), AuthInfo()); return; } @@ -335,6 +336,7 @@ bool SaslProtocol::SendSaslMessage(RpcSaslProto & message) std::shared_ptr connection = connection_.lock(); if (!connection) { LOG_DEBUG(kRPC, << "Tried sending a SASL Message but the RPC connection was gone"); + AuthComplete(Status::AuthenticationFailed("Lost RPC Connection"), AuthInfo()); return false; }