mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
simplifies connect attempt async shutdown
This commit is contained in:
@@ -118,14 +118,12 @@ ConnectAttempt::tryAsyncShutdown()
|
||||
strand_.running_in_this_thread(),
|
||||
"ripple::ConnectAttempt::tryAsyncShutdown : strand in this thread");
|
||||
|
||||
if (!shutdown_ || shutdownStarted_)
|
||||
if (!shutdown_)
|
||||
return;
|
||||
|
||||
if (ioPending_)
|
||||
return;
|
||||
|
||||
shutdownStarted_ = true;
|
||||
|
||||
setTimer();
|
||||
|
||||
// gracefully shutdown the SSL socket, performing a shutdown handshake
|
||||
@@ -288,7 +286,7 @@ ConnectAttempt::onHandshake(error_code ec)
|
||||
return fail("onHandshake", ec);
|
||||
}
|
||||
|
||||
endpoint_type local_endpoint = socket_.local_endpoint(ec);
|
||||
auto const local_endpoint = socket_.local_endpoint(ec);
|
||||
if (ec)
|
||||
return fail("onHandshake", ec);
|
||||
|
||||
@@ -320,7 +318,6 @@ ConnectAttempt::onHandshake(error_code ec)
|
||||
return tryAsyncShutdown();
|
||||
|
||||
setTimer();
|
||||
|
||||
ioPending_ = true;
|
||||
|
||||
boost::beast::http::async_write(
|
||||
@@ -460,7 +457,7 @@ ConnectAttempt::processResponse()
|
||||
|
||||
try
|
||||
{
|
||||
auto publicKey = verifyHandshake(
|
||||
auto const publicKey = verifyHandshake(
|
||||
response_,
|
||||
*sharedValue,
|
||||
overlay_.setup().networkID,
|
||||
|
||||
@@ -61,7 +61,6 @@ private:
|
||||
request_type req_;
|
||||
bool shutdown_ = false;
|
||||
bool ioPending_ = false;
|
||||
bool shutdownStarted_ = false;
|
||||
|
||||
public:
|
||||
ConnectAttempt(
|
||||
|
||||
Reference in New Issue
Block a user