mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
pool: additional debug logging for stratum pools.
Might help in trying to resove issue 88.
This commit is contained in:
parent
4e08eb41ef
commit
87102ecd07
@ -5596,6 +5596,7 @@ retry_stratum:
|
||||
goto retry_stratum;
|
||||
}
|
||||
|
||||
/* json_rpc_call() above succeeded */
|
||||
if (val) {
|
||||
struct work *work = make_work();
|
||||
bool rc;
|
||||
|
10
util.c
10
util.c
@ -2095,8 +2095,11 @@ static bool setup_stratum_socket(struct pool *pool)
|
||||
|
||||
mutex_lock(&pool->stratum_lock);
|
||||
pool->stratum_active = false;
|
||||
if (pool->sock)
|
||||
if (pool->sock) {
|
||||
/* FIXME: change to LOG_DEBUG if issue #88 resolved */
|
||||
applog(LOG_INFO, "Closing %s socket", pool->poolname);
|
||||
CLOSESOCKET(pool->sock);
|
||||
}
|
||||
pool->sock = 0;
|
||||
mutex_unlock(&pool->stratum_lock);
|
||||
|
||||
@ -2119,9 +2122,10 @@ static bool setup_stratum_socket(struct pool *pool)
|
||||
sockaddr_url = pool->sockaddr_url;
|
||||
sockaddr_port = pool->stratum_port;
|
||||
}
|
||||
|
||||
if (getaddrinfo(sockaddr_url, sockaddr_port, hints, &servinfo) != 0) {
|
||||
if (!pool->probed) {
|
||||
applog(LOG_WARNING, "Failed to resolve (?wrong URL) %s:%s",
|
||||
applog(LOG_WARNING, "Failed to resolve (wrong URL?) %s:%s",
|
||||
sockaddr_url, sockaddr_port);
|
||||
pool->probed = true;
|
||||
} else {
|
||||
@ -2278,6 +2282,8 @@ bool initiate_stratum(struct pool *pool)
|
||||
|
||||
resend:
|
||||
if (!setup_stratum_socket(pool)) {
|
||||
/* FIXME: change to LOG_DEBUG when issue #88 resolved */
|
||||
applog(LOG_INFO, "setup_stratum_socket() on %s failed", pool->poolname);
|
||||
sockd = false;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user