diff --git a/Presentation/HushianWebApp/Pages/Chat.razor b/Presentation/HushianWebApp/Pages/Chat.razor index 794cdd3..179ebb3 100644 --- a/Presentation/HushianWebApp/Pages/Chat.razor +++ b/Presentation/HushianWebApp/Pages/Chat.razor @@ -15,6 +15,8 @@ @inject ILocalStorageService localStorageService; @inject HttpClient _Http; @inject NavigationManager nav +@implements IAsyncDisposable + گفتمان @@ -782,7 +784,14 @@ SelectedImagePreview = null; return Task.CompletedTask; } - + public async ValueTask DisposeAsync() + { + if (hubConnection is not null) + { + await hubConnection.StopAsync(); + await hubConnection.DisposeAsync(); + } + } }