@@ -92,8 +92,7 @@ class FoxyClient : public Client,
92
92
initial_reconnect_delay.value_or(kDefaultInitialReconnectDelay ),
93
93
kDefaultMaxBackoffDelay),
94
94
backoff_timer_(session_.get_executor()),
95
- last_read_(std::nullopt),
96
- shutting_down_(false ) {
95
+ last_read_(std::nullopt) {
97
96
create_parser ();
98
97
}
99
98
@@ -160,7 +159,6 @@ class FoxyClient : public Client,
160
159
logger_ (msg.str ());
161
160
162
161
create_parser ();
163
-
164
162
backoff_timer_.expires_from_now (backoff_.delay ());
165
163
backoff_timer_.async_wait (beast::bind_front_handler (
166
164
&FoxyClient::on_backoff, shared_from_this ()));
@@ -293,8 +291,8 @@ class FoxyClient : public Client,
293
291
294
292
void on_read_body (boost::system::error_code ec, std::size_t amount) {
295
293
boost::ignore_unused (amount);
296
- if (ec == boost::asio::error::operation_aborted && shutting_down_ ) {
297
- logger_ (" read HTTP response body aborted (shutting down) " );
294
+ if (ec == boost::asio::error::operation_aborted) {
295
+ logger_ (" read HTTP response body aborted" );
298
296
return ;
299
297
}
300
298
if (body_parser_->is_done ()) {
@@ -321,7 +319,6 @@ class FoxyClient : public Client,
321
319
}
322
320
323
321
void do_shutdown (std::function<void ()> completion) {
324
- shutting_down_ = true ;
325
322
backoff_timer_.cancel ();
326
323
session_.async_shutdown (beast::bind_front_handler (
327
324
&FoxyClient::on_shutdown, std::move (completion)));
@@ -398,8 +395,6 @@ class FoxyClient : public Client,
398
395
boost::asio::steady_timer backoff_timer_;
399
396
400
397
std::optional<std::chrono::steady_clock::time_point> last_read_;
401
-
402
- bool shutting_down_;
403
398
};
404
399
405
400
Builder::Builder (net::any_io_executor ctx, std::string url)
0 commit comments