fix: wrong loop handling (return->continue)
This commit is contained in:
parent
d1d1de221f
commit
0b8c755a6b
1 changed files with 4 additions and 6 deletions
|
@ -97,15 +97,13 @@ void controllers::post_discover(const HttpRequestPtr &req, std::function<void(co
|
|||
std::ifstream answer_payload_stream(answer_payload);
|
||||
|
||||
Json::CharReaderBuilder json_reader;
|
||||
std::string errs;
|
||||
std::string errors;
|
||||
Json::Value client_info;
|
||||
|
||||
if (!Json::parseFromStream(json_reader, answer_payload_stream, &client_info, &errs))
|
||||
if (!Json::parseFromStream(json_reader, answer_payload_stream, &client_info, &errors))
|
||||
{
|
||||
// report to the user the failure and their locations in the document.
|
||||
std::cout << "Failed to parse configuration\n"
|
||||
<< errs;
|
||||
return;
|
||||
LOG_ERROR << "Failed to parse configuration: " << errors;
|
||||
continue;
|
||||
}
|
||||
|
||||
free(answer_payload);
|
||||
|
|
Loading…
Reference in a new issue