|
@@ -2443,7 +2443,6 @@ curl_socket_t grab_socket_opensocket_cb(void *clientp, __maybe_unused curlsockty
|
|
|
|
|
|
|
|
static bool setup_stratum_curl(struct pool *pool)
|
|
static bool setup_stratum_curl(struct pool *pool)
|
|
|
{
|
|
{
|
|
|
- char curl_err_str[CURL_ERROR_SIZE];
|
|
|
|
|
CURL *curl = NULL;
|
|
CURL *curl = NULL;
|
|
|
char s[RBUFSIZE];
|
|
char s[RBUFSIZE];
|
|
|
bool ret = false;
|
|
bool ret = false;
|
|
@@ -2474,7 +2473,7 @@ static bool setup_stratum_curl(struct pool *pool)
|
|
|
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1);
|
|
curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1);
|
|
|
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 30);
|
|
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 30);
|
|
|
- curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_err_str);
|
|
|
|
|
|
|
+ curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pool->curl_err_str);
|
|
|
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
|
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
|
|
if (!opt_delaynet)
|
|
if (!opt_delaynet)
|
|
|
curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1);
|
|
curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1);
|
|
@@ -2513,11 +2512,12 @@ retry:
|
|
|
if (try_tls)
|
|
if (try_tls)
|
|
|
{
|
|
{
|
|
|
applog(LOG_DEBUG, "Stratum connect failed with TLS to pool %u: %s",
|
|
applog(LOG_DEBUG, "Stratum connect failed with TLS to pool %u: %s",
|
|
|
- pool->pool_no, curl_err_str);
|
|
|
|
|
|
|
+ pool->pool_no, pool->curl_err_str);
|
|
|
try_tls = false;
|
|
try_tls = false;
|
|
|
goto retry;
|
|
goto retry;
|
|
|
}
|
|
}
|
|
|
- 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, pool->curl_err_str);
|
|
|
errout:
|
|
errout:
|
|
|
curl_easy_cleanup(curl);
|
|
curl_easy_cleanup(curl);
|
|
|
pool->stratum_curl = NULL;
|
|
pool->stratum_curl = NULL;
|