Merge pull request #47285 from rzarzynski/wip-crimson-monc-discard_result

crimson/monc: replace then_unpack() with discard_result() if possible

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
Kefu Chai 2022-07-27 08:58:42 +08:00 committed by GitHub
commit e70ca62d9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -472,7 +472,7 @@ void Client::tick()
return seastar::when_all_succeed(wait_for_send_log(),
active_con->get_conn()->keepalive(),
active_con->renew_tickets(),
active_con->renew_rotating_keyring()).then_unpack([] {});
active_con->renew_rotating_keyring()).discard_result();
} else {
assert(is_hunting());
logger().info("{} continuing the hunt", __func__);
@ -794,7 +794,7 @@ seastar::future<> Client::handle_monmap(crimson::net::ConnectionRef conn,
logger().info("handle_monmap: renewing tickets");
return seastar::when_all_succeed(
active_con->renew_tickets(),
active_con->renew_rotating_keyring()).then_unpack([](){
active_con->renew_rotating_keyring()).then_unpack([] {
logger().info("handle_mon_map: renewed tickets");
});
} else {
@ -829,7 +829,7 @@ seastar::future<> Client::handle_auth_reply(crimson::net::ConnectionRef conn,
return active_con->handle_auth_reply(m).then([this] {
return seastar::when_all_succeed(
active_con->renew_rotating_keyring(),
active_con->renew_tickets()).then_unpack([] {});
active_con->renew_tickets()).discard_result();
});
} else {
logger().error("unknown auth reply from {}", conn->get_peer_addr());