mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 09:23:57 +00:00
Compare commits
2 Commits
4bd66621bf
...
49f4fdfda5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49f4fdfda5 | ||
|
|
bcc5716f97 |
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user