From 28f133657f0cda607fc5893a67daed352904ab92 Mon Sep 17 00:00:00 2001 From: De-Crypted Date: Sat, 20 Aug 2022 22:35:01 +0300 Subject: [PATCH] Check for empty json response from server. --- .../StratumConnectionProvider/StratumConnectionProvider.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ConnectionProviders/StratumConnectionProvider/StratumConnectionProvider.cs b/ConnectionProviders/StratumConnectionProvider/StratumConnectionProvider.cs index ac14326..721ca0a 100644 --- a/ConnectionProviders/StratumConnectionProvider/StratumConnectionProvider.cs +++ b/ConnectionProviders/StratumConnectionProvider/StratumConnectionProvider.cs @@ -238,6 +238,9 @@ private async Task OnReceived(AsyncTcpClient client, int count) { var jsonArr = jsonRaw.Split('\n').Where(str => !String.IsNullOrEmpty(str)); foreach (var json in jsonArr) { + if (string.IsNullOrEmpty(json)) { + continue; + }; if (json.Contains("\"method\"")) { var command = JsonSerializer.Deserialize(json);