will use this method also for sending requests which are not acked
Signed-off-by: Kefu Chai <kchai@redhat.com>
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();
logger().warn("mon.{} went away", cur_mon);
return reopen_session(-1).then([this] {
if (active_con) {
- send_pendings();
+ on_session_opened();
}
return seastar::now();
});
{
return reopen_session(-1).then([this] {
if (active_con) {
- send_pendings();
+ on_session_opened();
}
return seastar::now();
});
}
}
-void Client::send_pendings()
+void Client::on_session_opened()
{
for (auto& m : pending_messages) {
(void) active_con->get_conn()->send(m.msg);
seastar::future<> handle_log_ack(Ref<MLogAck> m);
seastar::future<> handle_config(Ref<MConfig> m);
- void send_pendings();
+ void on_session_opened();
private:
seastar::future<> load_keyring();
seastar::future<> authenticate();