diff --git a/cpu-miner.c b/cpu-miner.c index 256a615..d5e6b4e 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -101,7 +101,7 @@ bool use_syslog = false; static bool opt_quiet = false; static int opt_retries = -1; static int opt_fail_pause = 30; -int opt_timeout = 180; +int opt_timeout = 270; int opt_scantime = 5; static json_t *opt_config; 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\ (default: retry indefinitely)\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\ in seconds (default: 5)\n\ --no-longpoll disable X-Long-Polling support\n\ diff --git a/util.c b/util.c index 9aae137..fef18bc 100644 --- a/util.c +++ b/util.c @@ -262,7 +262,7 @@ json_t *json_rpc_call(CURL *curl, const char *url, struct curl_slist *headers = NULL; char len_hdr[64]; char curl_err_str[CURL_ERROR_SIZE]; - long timeout = opt_timeout; + long timeout = longpoll ? opt_timeout : 30; struct header_info hi = {0}; bool lp_scanning = longpoll_scan && !have_longpoll;