diff OrthancServer/DicomProtocol/ReusableDicomUserConnection.cpp @ 1284:21ea32170764

Option "DicomAssociationCloseDelay" to set delay before closing DICOM association
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Feb 2015 14:07:07 +0100
parents 9d0c7301596e
children 5730f374e4e6
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/ReusableDicomUserConnection.cpp	Tue Feb 03 13:15:46 2015 +0100
+++ b/OrthancServer/DicomProtocol/ReusableDicomUserConnection.cpp	Tue Feb 03 14:07:07 2015 +0100
@@ -152,9 +152,15 @@
     Close();
   }
 
-  void ReusableDicomUserConnection::SetMillisecondsBeforeClose(unsigned int ms)
+  void ReusableDicomUserConnection::SetMillisecondsBeforeClose(uint64_t ms)
   {
     boost::mutex::scoped_lock lock(mutex_);
+
+    if (ms == 0)
+    {
+      ms = 1;
+    }
+
     timeBeforeClose_ = boost::posix_time::milliseconds(ms);
   }