Skip to content

Commit

Permalink
ensure signalr connection is disconnected before trying to start it
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Aug 3, 2024
1 parent 9165b9f commit 9feca80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/Jordnaer/SignalR/AuthenticatedSignalRClientBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 9feca80

Please sign in to comment.