Commit 903c666326d6ea7a4124a24ebcf627cd159ff770

Con Kolivas 2013-02-07T16:38:11

Fix logic fail on partial writes with stratum send that was leading to corrupt message submissions.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/util.c b/util.c
index 7e84c53..4d2d7d9 100644
--- a/util.c
+++ b/util.c
@@ -907,7 +907,7 @@ static bool __stratum_send(struct pool *pool, char *s, ssize_t len)
 			sent = 0;
 		}
 		ssent += sent;
-		len -= ssent;
+		len -= sent;
 	}
 
 	pool->cgminer_pool_stats.times_sent++;