Browse Source

Fail on select() failing in stratum thread without needing to attempt recv_line.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
d92609e665
  1. 4
      cgminer.c

4
cgminer.c

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

Loading…
Cancel
Save