mirror of https://github.com/Icinga/icinga2.git
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…
Reference in New Issue