From 7a61ee8a8e30ca2e252d47fd1c8712e26ad39f00 Mon Sep 17 00:00:00 2001 From: Alexis Christoforides Date: Fri, 25 Oct 2024 13:01:44 -0400 Subject: [PATCH] More fixup --- .../Meadow.HCom/Connections/SerialConnection.ListenerProc.cs | 2 +- .../v2/Meadow.HCom/Debugging/DebuggingServer.ActiveClient.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/v2/Meadow.HCom/Connections/SerialConnection.ListenerProc.cs b/Source/v2/Meadow.HCom/Connections/SerialConnection.ListenerProc.cs index d9c8a5d3..e7433e33 100644 --- a/Source/v2/Meadow.HCom/Connections/SerialConnection.ListenerProc.cs +++ b/Source/v2/Meadow.HCom/Connections/SerialConnection.ListenerProc.cs @@ -57,7 +57,7 @@ async Task ReOpen() // local function Debug.WriteLine($"Device reset detected"); var timeout = 20; - try { _port.Close(); } catch { } + try { _port.Close(); } catch { } // Swallow any exceptions on close - there is nothing we can do about it while (!_port.IsOpen) { diff --git a/Source/v2/Meadow.HCom/Debugging/DebuggingServer.ActiveClient.cs b/Source/v2/Meadow.HCom/Debugging/DebuggingServer.ActiveClient.cs index 13dd559d..f25cb25d 100644 --- a/Source/v2/Meadow.HCom/Debugging/DebuggingServer.ActiveClient.cs +++ b/Source/v2/Meadow.HCom/Debugging/DebuggingServer.ActiveClient.cs @@ -109,10 +109,8 @@ private async Task SendToVisualStudio() { while (!_cts.IsCancellationRequested) { - byte[] byteData = null; - if (!_debuggerMessages.TryTake(out byteData, 500, _cts.Token)) + if (!_debuggerMessages.TryTake(out var byteData, 500, _cts.Token)) { - Console.WriteLine("No data from Meadow"); continue; }