diff --git a/doc/variables.xml b/doc/variables.xml index c7ac6ffe..96b8b4e6 100644 --- a/doc/variables.xml +++ b/doc/variables.xml @@ -675,8 +675,8 @@ Download data from URI using Curl at the - specified interval. The interval may be a floating - point value greater than 0, otherwise defaults to 15 + specified interval. The interval may be a positive floating + point value (0 is allowed), otherwise defaults to 15 minutes. Most useful when used in conjunction with Lua and the Lua API. This object is threaded, and once a thread is created it can't be explicitly destroyed. diff --git a/src/ccurl_thread.cc b/src/ccurl_thread.cc index 82401dde..fdd0f14b 100644 --- a/src/ccurl_thread.cc +++ b/src/ccurl_thread.cc @@ -222,7 +222,7 @@ void curl_parse_arg(struct text_object *obj, const char *arg) NORM_ERR("wrong number of arguments for $curl"); return; } - cd->interval = interval > 0 ? interval * 60 : 15*60; + cd->interval = (argc == 2 && interval >= 0) ? interval * 60 : 15*60; obj->data.opaque = cd; }