mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8504 from Icinga/bugfix/replay-log-blocks
Start ApiListener#SyncClient() in the thread pool
This commit is contained in:
commit
97b59dc6cf
|
@ -691,12 +691,9 @@ void ApiListener::NewClientHandlerInternal(
|
||||||
if (endpoint) {
|
if (endpoint) {
|
||||||
endpoint->AddClient(aclient);
|
endpoint->AddClient(aclient);
|
||||||
|
|
||||||
IoEngine::SpawnCoroutine(IoEngine::Get().GetIoContext(), [this, aclient, endpoint](asio::yield_context yc) {
|
Utility::QueueAsyncCallback([this, aclient, endpoint]() {
|
||||||
CpuBoundWork syncClient (yc);
|
|
||||||
|
|
||||||
SyncClient(aclient, endpoint, true);
|
SyncClient(aclient, endpoint, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
} else if (!AddAnonymousClient(aclient)) {
|
} else if (!AddAnonymousClient(aclient)) {
|
||||||
Log(LogNotice, "ApiListener")
|
Log(LogNotice, "ApiListener")
|
||||||
<< "Ignoring anonymous JSON-RPC connection " << conninfo
|
<< "Ignoring anonymous JSON-RPC connection " << conninfo
|
||||||
|
|
Loading…
Reference in New Issue