]> granicus.if.org Git - icinga2/commitdiff
Rename preventGc to keepAlive
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 11 Mar 2019 09:12:05 +0000 (10:12 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 1 Apr 2019 11:31:16 +0000 (13:31 +0200)
lib/remote/httpserverconnection.cpp
lib/remote/jsonrpcconnection.cpp

index af2a69b42926ec9cbfd5191cc96f252c70151a8e..2d187faf50284f42b92d84adc783abee82a52dd0 100644 (file)
@@ -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;
 
index e54a998d08c3919be4aafd55f263336349237143..9019f425cbd02d6c64dfb33b2fe6e9670ab6fa58 100644 (file)
@@ -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;