Added configMutex around connector check in Prometheus output

This commit is contained in:
Thulinma 2017-11-15 09:48:31 +01:00
parent 421b77dacd
commit 91262767d3

View file

@ -1721,6 +1721,8 @@ void Controller::handlePrometheus(HTTP::Parser & H, Socket::Connection & conn, i
resp["conf_streams"].append(sIt.key());
}
{
tthread::lock_guard<tthread::mutex> guard(Controller::configMutex);
//Loop over connectors
const JSON::Value &caps = capabilities["connectors"];
jsonForEachConst(Storage["config"]["protocols"], prtcl){
@ -1774,6 +1776,7 @@ void Controller::handlePrometheus(HTTP::Parser & H, Socket::Connection & conn, i
}
}
}
}
H.Chunkify(resp.toString(), conn);
}