diff Core/HttpClient.cpp @ 3432:297ad330900c

merge
author Alain Mazy <alain@mazy.be>
date Mon, 17 Jun 2019 23:37:07 +0200
parents 6add197274b1
children 96780208dbd7
line wrap: on
line diff
--- a/Core/HttpClient.cpp	Mon Jun 17 23:36:37 2019 +0200
+++ b/Core/HttpClient.cpp	Mon Jun 17 23:37:07 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
     {