]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/log/Log.cc
update sources to 12.2.7
[ceph.git] / ceph / src / log / Log.cc
index 6af49b4c8cd56fd2a37ecb7f00b37fe215681193..5f7e23b4b048c0343972e53355463a864ea2a108 100644 (file)
@@ -433,13 +433,14 @@ void Log::start()
 
 void Log::stop()
 {
-  assert(is_started());
-  pthread_mutex_lock(&m_queue_mutex);
-  m_stop = true;
-  pthread_cond_signal(&m_cond_flusher);
-  pthread_cond_broadcast(&m_cond_loggers);
-  pthread_mutex_unlock(&m_queue_mutex);
-  join();
+  if (is_started()) {
+    pthread_mutex_lock(&m_queue_mutex);
+    m_stop = true;
+    pthread_cond_signal(&m_cond_flusher);
+    pthread_cond_broadcast(&m_cond_loggers);
+    pthread_mutex_unlock(&m_queue_mutex);
+    join();
+  }
 }
 
 void *Log::entry()