Skip to content

Commit

Permalink
More fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexischr committed Oct 25, 2024
1 parent db60cbc commit 7a61ee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7a61ee8

Please sign in to comment.