From 545baf858256db1b6e4064c82ab4c39841e135c4 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 13 Aug 2014 02:19:22 +0100 Subject: [PATCH] librados: update Objecter shutdown Previously checking for CONNECTED was equivalent to checking the objecter had been initialized, but since the separation between init() and start() that is no longer the case. Avoid the need to be smart by just readint Objecter::initialized to learn whether to call Objecter::shutdown Fixes: #9067 Signed-off-by: John Spray --- src/librados/RadosClient.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librados/RadosClient.cc b/src/librados/RadosClient.cc index f59cca963cef4..7fddcdebd03a5 100644 --- a/src/librados/RadosClient.cc +++ b/src/librados/RadosClient.cc @@ -280,7 +280,7 @@ void librados::RadosClient::shutdown() finisher.stop(); } bool need_objecter = false; - if (objecter && state == CONNECTED) { + if (objecter && objecter->initialized.read()) { need_objecter = true; } state = DISCONNECTED; -- 2.39.5