Browse Source

Merge commit 'd92609e' into bfgminer

Luke Dashjr 13 years ago
parent
commit
b68a893853
1 changed files with 4 additions and 2 deletions
  1. 4 2
      miner.c

+ 4 - 2
miner.c

@@ -5368,8 +5368,10 @@ 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);
-		s = recv_line(pool);
+		if (unlikely(select(pool->sock + 1, &rd, NULL, NULL, &timeout) < 1))
+			s = NULL;
+		else
+			s = recv_line(pool);
 		if (!s) {
 			if (!pool->has_stratum)
 				break;