Merge pull request #8504 from Icinga/bugfix/replay-log-blocks

Start ApiListener#SyncClient() in the thread pool
This commit is contained in:
Julian Brost 2020-11-25 08:58:29 +01:00 committed by GitHub
commit 97b59dc6cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -691,12 +691,9 @@ void ApiListener::NewClientHandlerInternal(
if (endpoint) {
endpoint->AddClient(aclient);
IoEngine::SpawnCoroutine(IoEngine::Get().GetIoContext(), [this, aclient, endpoint](asio::yield_context yc) {
CpuBoundWork syncClient (yc);
Utility::QueueAsyncCallback([this, aclient, endpoint]() {
SyncClient(aclient, endpoint, true);
});
} else if (!AddAnonymousClient(aclient)) {
Log(LogNotice, "ApiListener")
<< "Ignoring anonymous JSON-RPC connection " << conninfo