Compare commits

..

2 Commits

Author SHA1 Message Date
Kei-Luna
49f4fdfda5 Update ConfigContainer.cs 2026-04-30 15:46:03 +09:00
Kei-Luna
bcc5716f97 Fix for the function to save to the database. 2026-04-30 15:46:00 +09:00
2 changed files with 11 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ public class ServerOption
public string FallbackLanguage { get; set; } = "EN";
public string[] DefaultPermissions { get; set; } = ["Admin"];
public ServerProfile ServerProfile { get; set; } = new();
public bool EnableGmMenu { get; set; } = true;
public bool EnableGmMenu { get; set; } = false;
public bool AutoCreateUser { get; set; } = true;
public bool SavePersonalDebugFile { get; set; } = false;
public bool AutoSendResponseWhenNoHandler { get; set; } = true;

View File

@@ -74,12 +74,20 @@ public sealed class ProxyServer(
catch (OperationCanceledException) when (stoppingToken.IsCancellationRequested)
{
}
catch (SocketException) when (stoppingToken.IsCancellationRequested)
{
}
catch (ObjectDisposedException) when (stoppingToken.IsCancellationRequested)
{
}
}
public override Task StopAsync(CancellationToken cancellationToken)
public override async Task StopAsync(CancellationToken cancellationToken)
{
// Cancel the BackgroundService token first so shutdown exceptions are treated as expected.
var stopTask = base.StopAsync(cancellationToken);
_listener?.Stop();
return base.StopAsync(cancellationToken);
await stopTask;
}
private async Task HandleClientAsync(TcpClient client, CancellationToken cancellationToken)