crimson/osd: use finally for capturing this

* no need to capture this, it is already enclosed by `ref`
* use finally for capturing `ref`, and for printing out the "complete"
  logging message. we could use a different branch for printing out
  the failure message if any.

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-02-28 13:20:41 +08:00
parent c1a8ad1213
commit 776a3ab14a

View File

@ -90,8 +90,8 @@ seastar::future<> PeeringEvent::start()
}
}).then([this] {
return shard_services.send_pg_temp();
}).then([this, ref=std::move(ref)] {
logger().debug("{}: complete", *this);
}).finally([ref=std::move(ref)] {
logger().debug("{}: complete", *ref);
});
}