diff OrthancServer/DicomProtocol/DicomServer.cpp @ 431:16b52fb8d034

fix by cyril paulus
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 11 May 2013 12:19:20 +0200
parents 4d5f0857ec9c
children 012b63028085
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomServer.cpp	Wed May 08 15:16:13 2013 +0200
+++ b/OrthancServer/DicomProtocol/DicomServer.cpp	Sat May 11 12:19:20 2013 +0200
@@ -385,7 +385,11 @@
   void DicomServer::Stop()
   {
     continue_ = false;
-    pimpl_->thread_.join();
+
+    if (pimpl_->thread_.joinable())
+    {
+      pimpl_->thread_.join();
+    }
 
     bagOfDispatchers_.StopAll();
   }