From 90c26c8418a0104bf97bef33afdf87f5474c207f Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Tue, 26 May 2015 10:13:57 +0200 Subject: [PATCH] multipool: prevent last longpoll http errors on switch --- util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.cpp b/util.cpp index 9bc6704..cf7c2a5 100644 --- a/util.cpp +++ b/util.cpp @@ -590,7 +590,7 @@ json_t *json_rpc_call_pool(CURL *curl, struct pool_infos *pool, const char *req, return json_rpc_call(curl, pool->url, userpass, req, longpoll_scan, false, false, curl_err); } -/* called only from longpoll thread */ +/* called only from longpoll thread, we have the lp_url */ json_t *json_rpc_longpoll(CURL *curl, char *lp_url, struct pool_infos *pool, const char *req, int *curl_err) { char userpass[256]; @@ -600,7 +600,7 @@ json_t *json_rpc_longpoll(CURL *curl, char *lp_url, struct pool_infos *pool, con // on pool rotate by time-limit, this keepalive can be a problem bool keepalive = pool->time_limit == 0 || pool->time_limit > opt_timeout*4; - return json_rpc_call(curl, lp_url, userpass, req, want_longpoll, have_longpoll, keepalive, curl_err); + return json_rpc_call(curl, lp_url, userpass, req, false, true, keepalive, curl_err); } /**