Skip to content

Commit

Permalink
Merge pull request ceph#3243 from yuyuyu101/wip-10424
Browse files Browse the repository at this point in the history
librados: only call watch_flush if necessary

Reviewed-by: Loic Dachary <[email protected]>
  • Loading branch information
ldachary committed Dec 23, 2014
2 parents e1384af + 926a1b7 commit bb01f9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librados/RadosClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,6 @@ int librados::RadosClient::connect()

void librados::RadosClient::shutdown()
{
// make sure watch callbacks are flushed
watch_flush();

lock.Lock();
if (state == DISCONNECTED) {
lock.Unlock();
Expand All @@ -301,8 +298,11 @@ void librados::RadosClient::shutdown()
instance_id = 0;
timer.shutdown(); // will drop+retake lock
lock.Unlock();
if (need_objecter)
if (need_objecter) {
// make sure watch callbacks are flushed
watch_flush();
objecter->shutdown();
}
monclient.shutdown();
if (messenger) {
messenger->shutdown();
Expand Down

0 comments on commit bb01f9e

Please sign in to comment.