diff --git a/lib/remote/eventshandler.cpp b/lib/remote/eventshandler.cpp index cf07d6305..e6f895cf3 100644 --- a/lib/remote/eventshandler.cpp +++ b/lib/remote/eventshandler.cpp @@ -10,6 +10,7 @@ #include "base/objectlock.hpp" #include "base/json.hpp" #include +#include #include using namespace icinga; @@ -110,8 +111,8 @@ bool EventsHandler::HandleRequest( IoBoundWorkSlot dontLockTheIoThreadWhileWriting (yc); - stream.async_write_some(payload, yc); - stream.async_write_some(newLine, yc); + asio::async_write(stream, payload, yc); + asio::async_write(stream, newLine, yc); stream.async_flush(yc); } }