mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
EventsHandler: Drop superfluous CpuBoundWork
usage
This commit is contained in:
parent
72266434df
commit
32531fe909
@ -116,16 +116,12 @@ bool EventsHandler::HandleRequest(
|
||||
auto event (subscriber.GetInbox()->Shift(yc));
|
||||
|
||||
if (event) {
|
||||
CpuBoundWork buildingResponse (yc);
|
||||
|
||||
String body = JsonEncode(event);
|
||||
|
||||
boost::algorithm::replace_all(body, "\n", "");
|
||||
|
||||
asio::const_buffer payload (body.CStr(), body.GetLength());
|
||||
|
||||
buildingResponse.Done();
|
||||
|
||||
asio::async_write(stream, payload, yc);
|
||||
asio::async_write(stream, newLine, yc);
|
||||
stream.async_flush(yc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user