Skip to content

Commit

Permalink
Merge pull request #242 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
RC2-1
  • Loading branch information
adrianstevens authored Jan 2, 2023
2 parents 9c518f3 + 6250a08 commit bad57e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion source/Meadow.Core/MeadowOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ public async static Task Main(string[] _)
Resolver.Log.Trace("Running App");
await App.Run();

while (!AppAbort.IsCancellationRequested)
{
await Task.Delay(500);
}

// the user's app has exited, which is almost certainly not intended
Resolver.Log.Warn("App.Run has exited normally");
Resolver.Log.Warn("AppAbort cancellation has been requested");
}
catch (Exception e)
{
Expand Down
3 changes: 2 additions & 1 deletion source/Meadow.Core/Update/UpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ public void ApplyUpdate(UpdateInfo updateInfo)
var shutdownTimeoutTask = Task.Delay(TimeSpan.FromSeconds(5));
var shutDownTask = Resolver.App?.OnShutdown();

// TODO: cancel the app run cancellation token
// cancel the app run cancellation token
MeadowOS.AppAbort.Cancel();

// wait for the app to return, or the timeout
Task.WaitAny(shutDownTask, shutdownTimeoutTask);
Expand Down
2 changes: 1 addition & 1 deletion source/Meadow.F7/Meadow.F7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Compile Remove="Devices\Esp32Coprocessor\Esp32Coprocessor_WiredNetworkAdapter.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\icon.png" Link="icon.png" Pack="true" PackagePath="" />
<None Include="..\icon.png" Link="icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow" Version="0.*" />
Expand Down

0 comments on commit bad57e2

Please sign in to comment.