comparison 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
comparison
equal deleted inserted replaced
1283:6066529e34c8 1284:21ea32170764
150 continue_ = false; 150 continue_ = false;
151 closeThread_.join(); 151 closeThread_.join();
152 Close(); 152 Close();
153 } 153 }
154 154
155 void ReusableDicomUserConnection::SetMillisecondsBeforeClose(unsigned int ms) 155 void ReusableDicomUserConnection::SetMillisecondsBeforeClose(uint64_t ms)
156 { 156 {
157 boost::mutex::scoped_lock lock(mutex_); 157 boost::mutex::scoped_lock lock(mutex_);
158
159 if (ms == 0)
160 {
161 ms = 1;
162 }
163
158 timeBeforeClose_ = boost::posix_time::milliseconds(ms); 164 timeBeforeClose_ = boost::posix_time::milliseconds(ms);
159 } 165 }
160 166
161 void ReusableDicomUserConnection::SetLocalApplicationEntityTitle(const std::string& aet) 167 void ReusableDicomUserConnection::SetLocalApplicationEntityTitle(const std::string& aet)
162 { 168 {