From 5b2c1f023da4184aa6b7896363a2544ac5a0b8a5 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 11 Mar 2019 10:12:05 +0100 Subject: [PATCH] Rename preventGc to keepAlive --- lib/remote/httpserverconnection.cpp | 10 +++++----- lib/remote/jsonrpcconnection.cpp | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) 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;