diff --git a/Amethyst/Amethyst.csproj b/Amethyst/Amethyst.csproj
index 954fc6b..8c19558 100644
--- a/Amethyst/Amethyst.csproj
+++ b/Amethyst/Amethyst.csproj
@@ -28,8 +28,8 @@
Amethyst (Desktop) App
k2vr.tech
- 1.2.13.0
- 1.2.13.0
+ 1.2.14.0
+ 1.2.14.0
https://github.com/KinectToVR/Amethyst
true
diff --git a/Amethyst/Classes/Main.cs b/Amethyst/Classes/Main.cs
index ca514c6..139eef4 100644
--- a/Amethyst/Classes/Main.cs
+++ b/Amethyst/Classes/Main.cs
@@ -590,7 +590,7 @@ public static async void MainLoop()
{
serverLoops = 0; // Reset the counter for the next 10'000 service loops
var elapsedTicks = loopStopWatch.ElapsedTicks; // Cache the elapsed time
- await Task.Delay(TimeSpan.FromTicks(diffTicks));
+ await Task.Delay(TimeSpan.FromTicks(diffTicks), cancellationToken.Token);
Logger.Info($"10000 loops have passed: this loop took {elapsedTicks} [ticks], " +
$"the loop's time after time correction (sleep) is: {loopStopWatch.ElapsedTicks} [ticks]");
@@ -598,7 +598,7 @@ public static async void MainLoop()
else
{
serverLoops++; // Else increase passed loops counter and wait
- await Task.Delay(TimeSpan.FromTicks(diffTicks));
+ await Task.Delay(TimeSpan.FromTicks(diffTicks), cancellationToken.Token);
}
#pragma warning disable CA1806 // Do not ignore method results
@@ -623,6 +623,9 @@ public static async void MainLoop()
serverTries++; // One more?
switch (serverTries)
{
+ case > 0 when e is TaskCanceledException:
+ break; // It's probably the token timeout, just don't care...
+
case > 3 and <= 7:
// We've crashed the third time now. Something's off.. really...
Logger.Fatal(new AggregateException(
diff --git a/Amethyst/Package.appxmanifest b/Amethyst/Package.appxmanifest
index f81dbea..a2c479b 100644
--- a/Amethyst/Package.appxmanifest
+++ b/Amethyst/Package.appxmanifest
@@ -11,7 +11,7 @@
+ Version="1.2.14.0" />
Amethyst - Open Source Body Tracking