Implemented installation handling. Added crash handling. Refactored tasks reset/cancel functions

This commit is contained in:
2025-02-14 21:15:03 +01:00
parent 761ab455f0
commit 1fbf1ae9ec
12 changed files with 264 additions and 44 deletions

View File

@@ -35,13 +35,19 @@ public partial class Server
}
catch (DockerContainerNotFoundException){}
// Canceling server tasks & listeners
await CancelTasks();
// and recreating cancellation token
Cancellation = new();
// Canceling server tasks & listeners and start new ones
await ResetTasks();
}
public async Task ResetTasks()
{
// Note: This will keep the docker container running, it will just cancel the server cancellation token
// and recreate the token
await CancelTasks();
Cancellation = new();
}
public async Task CancelTasks()
{
// Note: This will keep the docker container running, it will just cancel the server cancellation token