From fe0f4bb59647a0d34a67c254288ac550ed8497d3 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Sat, 16 Apr 2016 17:27:35 -0700 Subject: [PATCH] rgw: stop cr manager in destructor callers don't need to call it explicitly Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_coroutine.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_coroutine.h b/src/rgw/rgw_coroutine.h index 09128576bb1a4..b27d3e74a4612 100644 --- a/src/rgw/rgw_coroutine.h +++ b/src/rgw/rgw_coroutine.h @@ -536,6 +536,7 @@ public: } } virtual ~RGWCoroutinesManager() { + stop(); completion_mgr->put(); if (cr_registry) { cr_registry->remove(this); @@ -545,8 +546,9 @@ public: int run(list& ops); int run(RGWCoroutine *op); void stop() { - going_down.set(1); - completion_mgr->go_down(); + if (going_down.inc() == 1) { + completion_mgr->go_down(); + } } virtual void report_error(RGWCoroutinesStack *op); -- 2.39.5