From 9feca800e77e6eb2dec871c1bb494bb113f2b68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Pilgaard=20Gr=C3=B8ndahl?= Date: Sat, 3 Aug 2024 22:57:51 +0200 Subject: [PATCH] ensure signalr connection is disconnected before trying to start it --- src/web/Jordnaer/SignalR/AuthenticatedSignalRClientBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/Jordnaer/SignalR/AuthenticatedSignalRClientBase.cs b/src/web/Jordnaer/SignalR/AuthenticatedSignalRClientBase.cs index 11b7923d..195c968c 100644 --- a/src/web/Jordnaer/SignalR/AuthenticatedSignalRClientBase.cs +++ b/src/web/Jordnaer/SignalR/AuthenticatedSignalRClientBase.cs @@ -38,7 +38,7 @@ protected AuthenticatedSignalRClientBase( public async Task StartAsync(CancellationToken cancellationToken = default) { - if (!Started && HubConnection is not null) + if (!Started && HubConnection?.State is HubConnectionState.Disconnected) { _logger.LogDebug("Starting SignalR Client");