Skip to content

Commit 98c2450

Browse files
committed
Merge branch 'develop' into feature/sansio-exec
2 parents a048647 + c1c50e3 commit 98c2450

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/boost/redis/connection.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,10 @@ class run_op {
414414
return;
415415
}
416416

417-
// It is safe to use the writer timer here because we are not
418-
// connected.
419-
conn_->writer_timer_.expires_after(conn_->cfg_.reconnect_wait_interval);
417+
conn_->reconnect_timer_.expires_after(conn_->cfg_.reconnect_wait_interval);
420418

421419
BOOST_ASIO_CORO_YIELD
422-
conn_->writer_timer_.async_wait(asio::prepend(std::move(self), order_t{}));
420+
conn_->reconnect_timer_.async_wait(asio::prepend(std::move(self), order_t{}));
423421
if (ec0) {
424422
self.complete(ec0);
425423
return;
@@ -479,6 +477,7 @@ class basic_connection {
479477
: ctx_{std::move(ctx)}
480478
, stream_{std::make_unique<next_layer_type>(ex, ctx_)}
481479
, writer_timer_{ex}
480+
, reconnect_timer_{ex}
482481
, receive_channel_{ex, 256}
483482
, resv_{ex}
484483
, health_checker_{ex}
@@ -798,6 +797,7 @@ class basic_connection {
798797
// also more suitable than a channel and the notify operation does
799798
// not suspend.
800799
timer_type writer_timer_;
800+
timer_type reconnect_timer_; // to wait the reconnection period
801801
receive_channel_type receive_channel_;
802802
resolver_type resv_;
803803
detail::connector ctor_;

0 commit comments

Comments
 (0)