Browse Source

Bugfix: Clear stratum receive buffer when initializing, in case there was extra unprocessed data in it from a previous connection

Luke Dashjr 13 years ago
parent
commit
12bf9ffb81
1 changed files with 1 additions and 0 deletions
  1. 1 0
      util.c

+ 1 - 0
util.c

@@ -1342,6 +1342,7 @@ bool initiate_stratum(struct pool *pool)
 		if (unlikely(!pool->stratum_curl))
 			quit(1, "Failed to curl_easy_init in initiate_stratum");
 	}
+	pool->readbuf.len = 0;
 	mutex_unlock(&pool->stratum_lock);
 	curl = pool->stratum_curl;