diff options
author | Josh Durgin <josh.durgin@dreamhost.com> | 2012-02-06 17:59:36 -0800 |
---|---|---|
committer | Josh Durgin <josh.durgin@dreamhost.com> | 2012-03-01 17:16:29 -0800 |
commit | cd313885783a5a69a554139b5b41d21a666c815b (patch) | |
tree | 5d49916cac9ab5f80e898d5ac294a5d7231bcfa6 | |
parent | 749281eda741b3190c8e102fb3d253621ae17780 (diff) | |
download | ceph-cd313885783a5a69a554139b5b41d21a666c815b.tar.gz |
librados: only shutdown objecter after it's initialized
The objecter is only initialized once the RadosClient state is
CONNECTED from the perspective of a RadosClient::shutdown()
caller. Error paths in RadosClient::connect() may call shutdown while
still in the CONNECTING state.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
-rw-r--r-- | src/librados.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librados.cc b/src/librados.cc index 7262b759c94..0e558cdafe3 100644 --- a/src/librados.cc +++ b/src/librados.cc @@ -1015,11 +1015,11 @@ void librados::RadosClient::shutdown() lock.Unlock(); return; } - state = DISCONNECTED; monclient.shutdown(); - if (objecter) + if (objecter && state == CONNECTED) objecter->shutdown(); timer.shutdown(); + state = DISCONNECTED; lock.Unlock(); if (messenger) { messenger->shutdown(); |