diff --git a/src/protocol/KafkaMessage.cc b/src/protocol/KafkaMessage.cc index 0f8f2b3b..968a77f8 100644 --- a/src/protocol/KafkaMessage.cc +++ b/src/protocol/KafkaMessage.cc @@ -2818,7 +2818,7 @@ int KafkaResponse::parse_response() return -1; } - return 0; + return ret; } static int kafka_meta_parse_broker(void **buf, size_t *size, @@ -3771,10 +3771,12 @@ int KafkaResponse::parse_saslhandshake(void **buf, size_t *size) int KafkaResponse::parse_saslauthenticate(void **buf, size_t *size) { std::string error_message; + std::string auth_bytes; int16_t error = 0; CHECK_RET(parse_i16(buf, size, &error)); CHECK_RET(parse_string(buf, size, error_message)); + CHECK_RET(parse_bytes(buf, size, auth_bytes)); if (error != 0) { @@ -3782,9 +3784,6 @@ int KafkaResponse::parse_saslauthenticate(void **buf, size_t *size) return 1; } - std::string auth_bytes; - CHECK_RET(parse_bytes(buf, size, auth_bytes)); - errno = 0; if (this->config.get_raw_ptr()->recv(auth_bytes.c_str(), auth_bytes.size(),