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