1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Show mechanism of stratum interruption if select times out.

This commit is contained in:
Con Kolivas 2013-03-07 13:39:00 +11:00
parent 011ea64096
commit bba99bd88c

View File

@ -4881,9 +4881,10 @@ static void *stratum_thread(void *userdata)
* every minute so if we fail to receive any for 90 seconds we * every minute so if we fail to receive any for 90 seconds we
* assume the connection has been dropped and treat this pool * assume the connection has been dropped and treat this pool
* as dead */ * as dead */
if (!sock_full(pool) && select(pool->sock + 1, &rd, NULL, NULL, &timeout) < 1) if (!sock_full(pool) && select(pool->sock + 1, &rd, NULL, NULL, &timeout) < 1) {
applog(LOG_DEBUG, "Stratum select timeout on pool %d", pool->pool_no);
s = NULL; s = NULL;
else } else
s = recv_line(pool); s = recv_line(pool);
if (!s) { if (!s) {
applog(LOG_NOTICE, "Stratum connection to pool %d interrupted", pool->pool_no); applog(LOG_NOTICE, "Stratum connection to pool %d interrupted", pool->pool_no);