Added configMutex around connector check in Prometheus output
This commit is contained in:
parent
421b77dacd
commit
91262767d3
1 changed files with 50 additions and 47 deletions
|
@ -1721,6 +1721,8 @@ void Controller::handlePrometheus(HTTP::Parser & H, Socket::Connection & conn, i
|
||||||
resp["conf_streams"].append(sIt.key());
|
resp["conf_streams"].append(sIt.key());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
tthread::lock_guard<tthread::mutex> guard(Controller::configMutex);
|
||||||
//Loop over connectors
|
//Loop over connectors
|
||||||
const JSON::Value &caps = capabilities["connectors"];
|
const JSON::Value &caps = capabilities["connectors"];
|
||||||
jsonForEachConst(Storage["config"]["protocols"], prtcl){
|
jsonForEachConst(Storage["config"]["protocols"], prtcl){
|
||||||
|
@ -1774,6 +1776,7 @@ void Controller::handlePrometheus(HTTP::Parser & H, Socket::Connection & conn, i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
H.Chunkify(resp.toString(), conn);
|
H.Chunkify(resp.toString(), conn);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue