simplifies connect attempt async shutdown

This commit is contained in:
Vito
2025-08-27 11:44:26 +02:00
parent df82fe3311
commit a6eb8379f0
2 changed files with 3 additions and 7 deletions

View File

@@ -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,

View File

@@ -61,7 +61,6 @@ private:
request_type req_;
bool shutdown_ = false;
bool ioPending_ = false;
bool shutdownStarted_ = false;
public:
ConnectAttempt(