Change the default timeout to 270 seconds

This commit is contained in:
pooler 2012-03-30 16:26:24 +02:00
parent d4dddcb113
commit 7dd70bc05f
2 changed files with 3 additions and 3 deletions

View file

@ -101,7 +101,7 @@ bool use_syslog = false;
static bool opt_quiet = false; static bool opt_quiet = false;
static int opt_retries = -1; static int opt_retries = -1;
static int opt_fail_pause = 30; static int opt_fail_pause = 30;
int opt_timeout = 180; int opt_timeout = 270;
int opt_scantime = 5; int opt_scantime = 5;
static json_t *opt_config; static json_t *opt_config;
static const bool opt_time = true; static const bool opt_time = true;
@ -139,7 +139,7 @@ Options:\n\
-r, --retries=N number of times to retry if a network call fails\n\ -r, --retries=N number of times to retry if a network call fails\n\
(default: retry indefinitely)\n\ (default: retry indefinitely)\n\
-R, --retry-pause=N time to pause between retries, in seconds (default: 30)\n\ -R, --retry-pause=N time to pause between retries, in seconds (default: 30)\n\
-T, --timeout=N network timeout, in seconds (default: 180)\n\ -T, --timeout=N network timeout, in seconds (default: 270)\n\
-s, --scantime=N upper bound on time spent scanning current work,\n\ -s, --scantime=N upper bound on time spent scanning current work,\n\
in seconds (default: 5)\n\ in seconds (default: 5)\n\
--no-longpoll disable X-Long-Polling support\n\ --no-longpoll disable X-Long-Polling support\n\

2
util.c
View file

@ -262,7 +262,7 @@ json_t *json_rpc_call(CURL *curl, const char *url,
struct curl_slist *headers = NULL; struct curl_slist *headers = NULL;
char len_hdr[64]; char len_hdr[64];
char curl_err_str[CURL_ERROR_SIZE]; char curl_err_str[CURL_ERROR_SIZE];
long timeout = opt_timeout; long timeout = longpoll ? opt_timeout : 30;
struct header_info hi = {0}; struct header_info hi = {0};
bool lp_scanning = longpoll_scan && !have_longpoll; bool lp_scanning = longpoll_scan && !have_longpoll;