Temp diagnostics

This commit is contained in:
HueByte
2026-02-19 13:22:13 +01:00
parent 552fe6afa3
commit caba400f43
3 changed files with 27 additions and 0 deletions
@@ -38,7 +38,9 @@ public sealed class IrcGatewayService : BackgroundService
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
Console.Error.WriteLine("[DIAG] IrcGatewayService.ExecuteAsync entered.");
await Task.Yield();
Console.Error.WriteLine($"[DIAG] IrcGatewayService.ExecuteAsync resumed after Task.Yield(). Enabled={_options.Enabled}");
if (!_options.Enabled)
{
@@ -141,8 +143,10 @@ public sealed class IrcGatewayService : BackgroundService
public override async Task StopAsync(CancellationToken cancellationToken)
{
Console.Error.WriteLine("[DIAG] IrcGatewayService.StopAsync entered.");
// Cancel ExecuteAsync first so listeners stop accepting
await base.StopAsync(cancellationToken);
Console.Error.WriteLine("[DIAG] IrcGatewayService.StopAsync: base.StopAsync returned.");
// Force-close any remaining client connections
foreach (var (_, conn) in _connections)