]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rest_bench: drain the work queue to fix a crash
authorhuangjun <hjwsm1989@gmail.com>
Thu, 16 Jul 2015 01:17:59 +0000 (09:17 +0800)
committerLoic Dachary <ldachary@redhat.com>
Tue, 28 Jul 2015 15:26:50 +0000 (17:26 +0200)
Fixes: #3896
Signed-off-by: huangjun <hjwsm1989@gmail.com>
(cherry picked from commit f3d34d8ff921dbd2ff21f6b72af7c73bb9c6940e)

src/tools/rest_bench.cc

index 50340d94f921d99dd5a4e684f418f215b1c94e4e..46a72c5b35c333f1b217d8c16c59d4b1d2bd854d 100644 (file)
@@ -281,6 +281,11 @@ public:
     list_bucket_handler.listBucketCallback = list_bucket_callback;
 
   }
+  ~RESTDispatcher()
+  {
+    req_wq.drain();
+    m_tp.stop();
+  } 
   void process_context(req_context *ctx);
   void get_obj(req_context *ctx);
   void put_obj(req_context *ctx);