From 629ad4562bdfce798090788236e6aa0b25476e9d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 22 May 2024 08:24:26 -0400 Subject: [PATCH] rgw/pubsub: Waiter unlocks before suspend Signed-off-by: Casey Bodley --- src/rgw/driver/rados/rgw_pubsub_push.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/driver/rados/rgw_pubsub_push.cc b/src/rgw/driver/rados/rgw_pubsub_push.cc index ce765853ed4..b5b97c9ba62 100644 --- a/src/rgw/driver/rados/rgw_pubsub_push.cc +++ b/src/rgw/driver/rados/rgw_pubsub_push.cc @@ -154,10 +154,10 @@ public: auto yield = y.get_yield_context(); auto&& token = yield[ec]; boost::asio::async_initiate( - [this] (auto handler, auto ex) { + [this, &l] (auto handler, auto ex) { completion = Completion::create(ex, std::move(handler)); + l.unlock(); // unlock before suspend }, token, yield.get_executor()); - l.unlock(); return -ec.value(); } cond.wait(l, [this]{return (done==true);});