From e47f6fba60b8fa0d941f36433683266b74082c85 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 3 Apr 2021 01:54:52 +0300 Subject: [PATCH] Remove cluster_client_t::stop() --- src/cluster_client.cpp | 13 +++++-------- src/cluster_client.h | 2 +- src/qemu_proxy.cpp | 1 - 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/cluster_client.cpp b/src/cluster_client.cpp index 44031203b..ea2fbeda3 100644 --- a/src/cluster_client.cpp +++ b/src/cluster_client.cpp @@ -96,14 +96,6 @@ cluster_client_t::~cluster_client_t() } } -void cluster_client_t::stop() -{ - while (msgr.clients.size() > 0) - { - msgr.stop_client(msgr.clients.begin()->first); - } -} - void cluster_client_t::continue_ops(bool up_retry) { for (auto op_it = cur_ops.begin(); op_it != cur_ops.end(); ) @@ -250,6 +242,11 @@ void cluster_client_t::on_change_osd_state_hook(uint64_t peer_osd) } } +bool cluster_client_t::is_ready() +{ + return pgs_loaded; +} + void cluster_client_t::on_ready(std::function fn) { if (pgs_loaded) diff --git a/src/cluster_client.h b/src/cluster_client.h index df263ebe9..1199a0a67 100644 --- a/src/cluster_client.h +++ b/src/cluster_client.h @@ -87,8 +87,8 @@ public: cluster_client_t(ring_loop_t *ringloop, timerfd_manager_t *tfd, json11::Json & config); ~cluster_client_t(); void execute(cluster_op_t *op); + bool is_ready(); void on_ready(std::function fn); - void stop(); protected: void continue_ops(bool up_retry = false); diff --git a/src/qemu_proxy.cpp b/src/qemu_proxy.cpp index 4ea3c9857..aaa2fe2e4 100644 --- a/src/qemu_proxy.cpp +++ b/src/qemu_proxy.cpp @@ -47,7 +47,6 @@ public: ~QemuProxy() { - cli->stop(); delete cli; delete tfd; }