properly handle sigterm and dont freeze forever on unload

This commit is contained in:
zznty
2023-07-13 13:18:20 +07:00
parent d7e5f53e4f
commit 83dfc7152f
3 changed files with 17 additions and 4 deletions

View File

@@ -116,7 +116,7 @@ namespace Torch.Server
if (_server?.State == ServerState.Running)
_server.Stop();
Process.GetCurrentProcess().Kill();
Environment.Exit(0);
}
}
}