Mercurial > hg > orthanc
diff Core/HttpClient.cpp @ 3428:6add197274b1
default value of HttpTimeout is now 60 seconds
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 17 Jun 2019 09:44:45 +0200 |
parents | 2cd0369a156f |
children | 96780208dbd7 |
line wrap: on
line diff
--- a/Core/HttpClient.cpp Sat Jun 15 18:06:08 2019 +0000 +++ b/Core/HttpClient.cpp Mon Jun 17 09:44:45 2019 +0200 @@ -46,6 +46,10 @@ #include <boost/thread/mutex.hpp> +// Default timeout = 60 seconds (in Orthanc <= 1.5.6, it was 10 seconds) +static const unsigned int DEFAULT_HTTP_TIMEOUT = 60; + + #if ORTHANC_ENABLE_PKCS11 == 1 # include "Pkcs11.h" #endif @@ -818,8 +822,8 @@ // Set timeouts if (timeout_ <= 0) { - CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_TIMEOUT, 10)); /* default: 10 seconds */ - CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_CONNECTTIMEOUT, 10)); /* default: 10 seconds */ + CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_TIMEOUT, DEFAULT_HTTP_TIMEOUT)); + CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_CONNECTTIMEOUT, DEFAULT_HTTP_TIMEOUT)); } else {