Browse Source

Bugfix: clear_sock should return on socket errors

Luke Dashjr 13 years ago
parent
commit
7a94a9a1ee
1 changed files with 1 additions and 3 deletions
  1. 1 3
      util.c

+ 1 - 3
util.c

@@ -906,9 +906,7 @@ static void clear_sock(struct pool *pool)
 	char buf[RECVSIZE];
 
 	mutex_lock(&pool->stratum_lock);
-	/* Ignore return code of curl_easy_recv since we're just clearing
-	 * anything in the socket if it's still alive */
-	while (CURLE_AGAIN != curl_easy_recv(pool->stratum_curl, buf, RECVSIZE, &n))
+	while (CURLE_OK == curl_easy_recv(pool->stratum_curl, buf, RECVSIZE, &n))
 	{}
 	mutex_unlock(&pool->stratum_lock);
 }