From c1ec55a6a34cf3ee4c858bc71aebeb668726ade7 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 9 Apr 2013 07:08:09 +1000 Subject: [PATCH] Avoid curl_easy_cleanup on old curl versions in setup_stratum_curl as well. --- util.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index 5497e7a8..b3cb9c03 100644 --- a/util.c +++ b/util.c @@ -1429,8 +1429,14 @@ static bool setup_stratum_curl(struct pool *pool) mutex_lock(&pool->stratum_lock); pool->stratum_active = false; - if (pool->stratum_curl) + if (pool->stratum_curl) { +#if CURL_HAS_KEEPALIVE curl_easy_cleanup(pool->stratum_curl); +#else + /* See above in suspend_stratum */ + CLOSESOCKET(pool->sock); +#endif + } pool->stratum_curl = curl_easy_init(); if (unlikely(!pool->stratum_curl)) quit(1, "Failed to curl_easy_init in initiate_stratum");