mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
crimson/osd: reduce the indent
instead of using a lambda, use a future variable for reducing the indent level. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
5e197a21e6
commit
c1a8ad1213
@ -53,14 +53,12 @@ seastar::future<> PeeringEvent::start()
|
||||
logger().debug("{}: start", *this);
|
||||
|
||||
IRef ref = this;
|
||||
return [this] {
|
||||
if (delay) {
|
||||
return seastar::sleep(std::chrono::milliseconds(
|
||||
std::lround(delay*1000)));
|
||||
} else {
|
||||
return seastar::now();
|
||||
}
|
||||
}().then([this] {
|
||||
auto maybe_delay = seastar::now();
|
||||
if (delay) {
|
||||
maybe_delay = seastar::sleep(
|
||||
std::chrono::milliseconds(std::lround(delay * 1000)));
|
||||
}
|
||||
return maybe_delay.then([this] {
|
||||
return get_pg();
|
||||
}).then([this](Ref<PG> pg) {
|
||||
if (!pg) {
|
||||
|
Loading…
Reference in New Issue
Block a user