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