From 36fc1f353436193a0b3e95af27edbf0e6cc4f4c2 Mon Sep 17 00:00:00 2001 From: Leonid Usov Date: Thu, 10 Aug 2023 16:18:53 +0300 Subject: [PATCH] msg/AsyncMessenger: re-evaluate the stop condition when woken up in 'wait()' Signed-off-by: Leonid Usov Fixes: https://tracker.ceph.com/issues/62395 --- src/msg/async/AsyncMessenger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg/async/AsyncMessenger.cc b/src/msg/async/AsyncMessenger.cc index 3971e91ffd0..d002d60897c 100644 --- a/src/msg/async/AsyncMessenger.cc +++ b/src/msg/async/AsyncMessenger.cc @@ -582,7 +582,7 @@ void AsyncMessenger::wait() if (!started) { return; } - if (!stopped) + while (!stopped) stop_cond.wait(locker); } dispatch_queue.shutdown(); -- 2.39.5