]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/pubsub: Waiter unlocks before suspend 57630/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 22 May 2024 12:24:26 +0000 (08:24 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 22 May 2024 12:24:26 +0000 (08:24 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_pubsub_push.cc

index ce765853ed4f48d1f463cdeecc8b63abf5fe8c42..b5b97c9ba6242f7f7020eada62b257b1fcdc47ae 100644 (file)
@@ -154,10 +154,10 @@ public:
       auto yield = y.get_yield_context();
       auto&& token = yield[ec];
       boost::asio::async_initiate<boost::asio::yield_context, Signature>(
-          [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);});