diff --git a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c index 453114e583..15ad1f069a 100644 --- a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c +++ b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c @@ -245,7 +245,7 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con #ifdef CURLOPT_TIMEOUT_MS curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT_MS, binding->timeout_ms); #else - curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, binding->timeout_ms); + curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, (binding->timeout_ms / 1000) ? (binding->timeout_ms / 1000) : 1); #endif curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1); }