1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-25 14:04:25 +00:00

Only curl easy cleanup a stratum curl if it exists.

This commit is contained in:
Con Kolivas 2013-03-14 22:08:19 +11:00
parent 6ce5d8c975
commit 1a74bc5631

2
util.c
View File

@ -1508,6 +1508,7 @@ void suspend_stratum(struct pool *pool)
applog(LOG_INFO, "Closing socket for stratum pool %d", pool->pool_no);
mutex_lock(&pool->stratum_lock);
pool->stratum_active = pool->stratum_notify = false;
if (pool->stratum_curl) {
#if CURL_HAS_KEEPALIVE
curl_easy_cleanup(pool->stratum_curl);
#else
@ -1517,6 +1518,7 @@ void suspend_stratum(struct pool *pool)
* every time we disconnect stratum. */
CLOSESOCKET(pool->sock);
#endif
}
pool->stratum_curl = NULL;
mutex_unlock(&pool->stratum_lock);
}