From: Kefu Chai Date: Tue, 2 Mar 2021 08:23:20 +0000 (+0800) Subject: crimson/mon: s/send_pendings/on_session_opened/ X-Git-Tag: v17.1.0~2790^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=94a8772afe2dc88b1df61815405c78771c838401;p=ceph-ci.git crimson/mon: s/send_pendings/on_session_opened/ will use this method also for sending requests which are not acked Signed-off-by: Kefu Chai --- diff --git a/src/crimson/mon/MonClient.cc b/src/crimson/mon/MonClient.cc index f623ac2cac9..06c08dfdf12 100644 --- a/src/crimson/mon/MonClient.cc +++ b/src/crimson/mon/MonClient.cc @@ -513,10 +513,10 @@ void Client::ms_handle_reset(crimson::net::ConnectionRef conn, bool /* is_replac logger().warn("active conn reset {}", conn->get_peer_addr()); active_con.reset(); return reopen_session(-1).then([this] { - if (active_con) { - send_pendings(); - } - return seastar::now(); + if (active_con) { + on_session_opened(); + } + return seastar::now(); }); } else { return seastar::now(); @@ -757,7 +757,7 @@ seastar::future<> Client::handle_monmap(crimson::net::ConnectionRef conn, logger().warn("mon.{} went away", cur_mon); return reopen_session(-1).then([this] { if (active_con) { - send_pendings(); + on_session_opened(); } return seastar::now(); }); @@ -878,7 +878,7 @@ seastar::future<> Client::authenticate() { return reopen_session(-1).then([this] { if (active_con) { - send_pendings(); + on_session_opened(); } return seastar::now(); }); @@ -1019,7 +1019,7 @@ seastar::future<> Client::send_message(MessageRef m) } } -void Client::send_pendings() +void Client::on_session_opened() { for (auto& m : pending_messages) { (void) active_con->get_conn()->send(m.msg); diff --git a/src/crimson/mon/MonClient.h b/src/crimson/mon/MonClient.h index 7e13846039b..549b407dc9c 100644 --- a/src/crimson/mon/MonClient.h +++ b/src/crimson/mon/MonClient.h @@ -155,7 +155,7 @@ private: seastar::future<> handle_log_ack(Ref m); seastar::future<> handle_config(Ref m); - void send_pendings(); + void on_session_opened(); private: seastar::future<> load_keyring(); seastar::future<> authenticate();