Shutdown ("Exit", "Stop") now exist
This commit is contained in:
@@ -4,6 +4,7 @@ using RelayServer.Services.Core;
|
||||
using RelayServer.Services.Data;
|
||||
using RelayServer.Services.Rtc;
|
||||
using RelayShared.Rtc;
|
||||
using RelayShared.Services;
|
||||
using WebSocketSharp.Server;
|
||||
|
||||
var surrealService = new SurrealService();
|
||||
@@ -41,7 +42,8 @@ Console.WriteLine("WebSocket server started");
|
||||
await app.StartAsync();
|
||||
Console.WriteLine("HTTP API started");
|
||||
|
||||
Console.ReadKey(true); // TODO: Make program stop be a console command
|
||||
ConsoleCommandService.Start();
|
||||
await Task.Delay(Timeout.Infinite, ConsoleCommandService.ShutdownTokenSource.Token);
|
||||
|
||||
wssv.Stop();
|
||||
await app.StopAsync();
|
||||
|
||||
Reference in New Issue
Block a user