From 5c0114617849e5e2565bcbb2568e82e5872b0a6c Mon Sep 17 00:00:00 2001 From: zoumingfo Date: Mon, 28 Feb 2022 15:37:42 +0800 Subject: [PATCH] Fix wrong replication state --- src/replication.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/replication.cc b/src/replication.cc index e8b3fd7d001..e6fe74bd418 100644 --- a/src/replication.cc +++ b/src/replication.cc @@ -206,6 +206,7 @@ void ReplicationThread::CallbacksStateMachine::EvCallback(bufferevent *bev, LOG(INFO) << "[replication] Wouldn't restart while the replication thread was stopped"; break; } + self->repl_->repl_state_ = kReplConnecting; LOG(INFO) << "[replication] Retry in 10 seconds"; std::this_thread::sleep_for(std::chrono::seconds(10)); self->Start();