From: Alexander A. Klimov Date: Mon, 11 Mar 2019 09:12:05 +0000 (+0100) Subject: Rename preventGc to keepAlive X-Git-Tag: v2.11.0-rc1~174^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b2c1f023da4184aa6b7896363a2544ac5a0b8a5;p=icinga2 Rename preventGc to keepAlive --- diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp index af2a69b42..2d187faf5 100644 --- a/lib/remote/httpserverconnection.cpp +++ b/lib/remote/httpserverconnection.cpp @@ -51,19 +51,19 @@ void HttpServerConnection::Start() { namespace asio = boost::asio; - HttpServerConnection::Ptr preventGc (this); + HttpServerConnection::Ptr keepAlive (this); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { ProcessMessages(yc); }); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { CheckLiveness(yc); }); + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { ProcessMessages(yc); }); + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { CheckLiveness(yc); }); } void HttpServerConnection::Disconnect() { namespace asio = boost::asio; - HttpServerConnection::Ptr preventGc (this); + HttpServerConnection::Ptr keepAlive (this); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { if (!m_ShuttingDown) { m_ShuttingDown = true; diff --git a/lib/remote/jsonrpcconnection.cpp b/lib/remote/jsonrpcconnection.cpp index e54a998d0..9019f425c 100644 --- a/lib/remote/jsonrpcconnection.cpp +++ b/lib/remote/jsonrpcconnection.cpp @@ -41,12 +41,12 @@ void JsonRpcConnection::Start() { namespace asio = boost::asio; - JsonRpcConnection::Ptr preventGc (this); + JsonRpcConnection::Ptr keepAlive (this); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { HandleIncomingMessages(yc); }); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { WriteOutgoingMessages(yc); }); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { HandleAndWriteHeartbeats(yc); }); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { CheckLiveness(yc); }); + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { HandleIncomingMessages(yc); }); + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { WriteOutgoingMessages(yc); }); + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { HandleAndWriteHeartbeats(yc); }); + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { CheckLiveness(yc); }); } void JsonRpcConnection::HandleIncomingMessages(boost::asio::yield_context yc) @@ -182,9 +182,9 @@ void JsonRpcConnection::Disconnect() { namespace asio = boost::asio; - JsonRpcConnection::Ptr preventGc (this); + JsonRpcConnection::Ptr keepAlive (this); - asio::spawn(m_IoStrand, [this, preventGc](asio::yield_context yc) { + asio::spawn(m_IoStrand, [this, keepAlive](asio::yield_context yc) { if (!m_ShuttingDown) { m_ShuttingDown = true;