mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
rgw: shutdown services only if initialized
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
parent
e0dc5a86cb
commit
84764013e4
@ -54,6 +54,7 @@ int RGWServices_Def::init(CephContext *cct,
|
||||
sysobj->init(rados.get(), sysobj_core.get());
|
||||
}
|
||||
|
||||
can_shutdown = true;
|
||||
|
||||
int r = finisher->start();
|
||||
if (r < 0) {
|
||||
@ -122,6 +123,10 @@ int RGWServices_Def::init(CephContext *cct,
|
||||
|
||||
void RGWServices_Def::shutdown()
|
||||
{
|
||||
if (!can_shutdown) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (has_shutdown) {
|
||||
return;
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ class RGWSI_SysObj_Cache;
|
||||
|
||||
struct RGWServices_Def
|
||||
{
|
||||
bool can_shutdown{false};
|
||||
bool has_shutdown{false};
|
||||
|
||||
std::unique_ptr<RGWSI_Finisher> finisher;
|
||||
|
Loading…
Reference in New Issue
Block a user