From 1eec6bb14f08124e1e8d6f2e0b072862590f1ff1 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 10 Oct 2023 22:17:53 +0200 Subject: Set timeout for command listener --- .../LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs') diff --git a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs index 0dcf3e3..f56f9c1 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs @@ -81,7 +81,7 @@ public class CommandListenerHostedService : IHostedService { _logger.LogError(e, "Error in command listener!"); } }); - await new SyncHelper(_hs).RunSyncLoopAsync(cancellationToken: cancellationToken); + await new SyncHelper(_hs){Timeout = 2500}.RunSyncLoopAsync(cancellationToken: cancellationToken); } /// Triggered when the application host is performing a graceful shutdown. -- cgit 1.4.1