File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -442,12 +442,10 @@ class run_op {
442
442
return ;
443
443
}
444
444
445
- // It is safe to use the writer timer here because we are not
446
- // connected.
447
- conn_->writer_timer_ .expires_after (conn_->cfg_ .reconnect_wait_interval );
445
+ conn_->reconnect_timer_ .expires_after (conn_->cfg_ .reconnect_wait_interval );
448
446
449
447
BOOST_ASIO_CORO_YIELD
450
- conn_->writer_timer_ .async_wait (asio::prepend (std::move (self), order_t {}));
448
+ conn_->reconnect_timer_ .async_wait (asio::prepend (std::move (self), order_t {}));
451
449
if (ec0) {
452
450
self.complete (ec0);
453
451
return ;
@@ -507,6 +505,7 @@ class basic_connection {
507
505
: ctx_{std::move (ctx)}
508
506
, stream_{std::make_unique<next_layer_type>(ex, ctx_)}
509
507
, writer_timer_{ex}
508
+ , reconnect_timer_{ex}
510
509
, receive_channel_{ex, 256 }
511
510
, resv_{ex}
512
511
, health_checker_{ex}
@@ -826,6 +825,7 @@ class basic_connection {
826
825
// also more suitable than a channel and the notify operation does
827
826
// not suspend.
828
827
timer_type writer_timer_;
828
+ timer_type reconnect_timer_; // to wait the reconnection period
829
829
receive_channel_type receive_channel_;
830
830
resolver_type resv_;
831
831
detail::connector ctor_;
You can’t perform that action at this time.
0 commit comments