summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1afa5e0)
raw | patch | inline | side by side (parent: 1afa5e0)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 4 Jan 2017 00:05:49 +0000 (01:05 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 4 Jan 2017 00:05:49 +0000 (01:05 +0100) |
When no timeout is specified, the default timeout should be set to the
configured interval, not the default timeout (which is -1, no timeout).
This bug got introduced in bce14a848.
configured interval, not the default timeout (which is -1, no timeout).
This bug got introduced in bce14a848.
src/curl_json.c | patch | blob | history |
diff --git a/src/curl_json.c b/src/curl_json.c
index 40e9c7ec6a1dd8ff3cafa02d8d90559d5a682301..37a4b8659294bed30642c0567471034e1d5fca74 100644 (file)
--- a/src/curl_json.c
+++ b/src/curl_json.c
curl_easy_setopt(db->curl, CURLOPT_TIMEOUT_MS, (long)db->timeout);
else if (db->interval > 0)
curl_easy_setopt(db->curl, CURLOPT_TIMEOUT_MS,
- (long)CDTIME_T_TO_MS(db->timeout));
+ (long)CDTIME_T_TO_MS(db->interval));
else
curl_easy_setopt(db->curl, CURLOPT_TIMEOUT_MS,
(long)CDTIME_T_TO_MS(plugin_get_interval()));