Browse Source

Cleanup when stratum curl fails to initialise.

Con Kolivas 12 years ago
parent
commit
1587b296d2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      util.c

+ 2 - 0
util.c

@@ -1793,6 +1793,8 @@ static bool setup_stratum_curl(struct pool *pool)
 	pool->sock = INVSOCK;
 	pool->sock = INVSOCK;
 	if (curl_easy_perform(curl)) {
 	if (curl_easy_perform(curl)) {
 		applog(LOG_INFO, "Stratum connect failed to pool %d: %s", pool->pool_no, curl_err_str);
 		applog(LOG_INFO, "Stratum connect failed to pool %d: %s", pool->pool_no, curl_err_str);
+		curl_easy_cleanup(curl);
+		pool->stratum_curl = NULL;
 		return false;
 		return false;
 	}
 	}
 	if (pool->sock == INVSOCK)
 	if (pool->sock == INVSOCK)