Skip to content

Commit ce9b1ff

Browse files
authored
Merge pull request #583 from WildernessLabs/version_bump
Add listener proc exception catch + minor cleanup + version bump
2 parents 42a6ff4 + 29057a0 commit ce9b1ff

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

Source/v2/Meadow.Cli/Meadow.CLI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Authors>Wilderness Labs, Inc</Authors>
1111
<Company>Wilderness Labs, Inc</Company>
1212
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
13-
<PackageVersion>2.0.51.0</PackageVersion>
13+
<PackageVersion>2.0.52.0</PackageVersion>
1414
<Platforms>AnyCPU</Platforms>
1515
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.CLI/</PackageProjectUrl>
1616
<RepositoryUrl>https://github.com/WildernessLabs/Meadow.CLI</RepositoryUrl>

Source/v2/Meadow.Cli/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ namespace Meadow.CLI;
66

77
public static class Constants
88
{
9-
public const string CLI_VERSION = "2.0.51.0";
9+
public const string CLI_VERSION = "2.0.52.0";
1010
}

Source/v2/Meadow.Hcom/Connections/SerialConnection.ListenerProc.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System.Runtime.InteropServices;
2-
3-
namespace Meadow.Hcom
1+
namespace Meadow.Hcom
42
{
53
public partial class SerialConnection
64
{
@@ -94,6 +92,11 @@ private async Task ListenerProc()
9492
}
9593
goto read;
9694
}
95+
catch (Exception ex)
96+
{
97+
Debug.WriteLine($"Error reading from port: {ex.Message}");
98+
await Task.Delay(1000);
99+
}
97100

98101
Debug.WriteLine($"Received {receivedLength} bytes");
99102

@@ -315,7 +318,6 @@ private async Task ListenerProc()
315318
}
316319
catch (IOException ioe)
317320
{
318-
319321
FileException?.Invoke(this, ioe);
320322
// attempt to read timed out (i.e. there's just no data)
321323
// NOP

Source/v2/Meadow.Hcom/Connections/SerialConnection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,13 +1284,15 @@ public override async Task StartDebugging(int port, ILogger? logger, Cancellatio
12841284
}
12851285
}
12861286

1287-
public override async Task SendDebuggerData(byte[] debuggerData, uint userData, CancellationToken? cancellationToken)
1287+
public override Task SendDebuggerData(byte[] debuggerData, uint userData, CancellationToken? cancellationToken)
12881288
{
12891289
var command = RequestBuilder.Build<DebuggerDataRequest>(userData);
12901290
command.DebuggerData = debuggerData;
12911291

12921292
_lastRequestConcluded = null;
12931293

12941294
EnqueueRequest(command);
1295+
1296+
return Task.CompletedTask;
12951297
}
12961298
}

Source/v2/Meadow.Hcom/Debugging/DebuggingServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public async Task StartListening(CancellationToken cancellationToken)
4949
_listener.Start();
5050
_logger?.LogInformation($"Listening for Visual Studio to connect");
5151

52-
// This call will wait for the client to connect, before continuing. We shouldn't need a loop.
52+
// This call will wait for the client to connect, before continuing.
5353
var tcpClient = await _listener.AcceptTcpClientAsync();
5454
_activeClient = CreateActiveClient(tcpClient);
5555
}

0 commit comments

Comments
 (0)