From 55f4ee316667e9192fbc9c4b3b90271015853cd6 Mon Sep 17 00:00:00 2001 From: hashmap Date: Tue, 22 Jan 2019 20:26:30 +0100 Subject: [PATCH] Fix regression in reading stratum messages (#2450) It was introduced in #2418, it turns out std read_line always appends to the string, not writes from the beginning, so when we have multiple workers to read from all messages are concatenated --- servers/src/mining/stratumserver.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servers/src/mining/stratumserver.rs b/servers/src/mining/stratumserver.rs index 5c3d37c7c..34cd3bcb7 100644 --- a/servers/src/mining/stratumserver.rs +++ b/servers/src/mining/stratumserver.rs @@ -301,6 +301,8 @@ impl StratumServer { } }; + the_message.clear(); + let mut stratum_stats = stratum_stats.write(); let worker_stats_id = stratum_stats .worker_stats