From 8bb4cd017c74533599a7e8e743b65d8f833d678f Mon Sep 17 00:00:00 2001 From: Luke Brown Date: Tue, 10 May 2022 08:28:01 -0500 Subject: [PATCH] applied reviewer suggestions: removing unnecessary async and adding necessary async --- Emby.Dlna/PlayTo/PlayToController.cs | 4 ++-- Emby.Server.Implementations/Session/SessionManager.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index 75f31ccc27..5169f65adb 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -890,9 +890,9 @@ namespace Emby.Dlna.PlayTo } /// - public async Task CloseAllWebSockets(CancellationToken cancellationToken) + public Task CloseAllWebSockets(CancellationToken cancellationToken) { - await Task.CompletedTask; + return Task.CompletedTask; } private class StreamParams diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index be0d14ea2c..9c00e9e9f4 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1359,13 +1359,13 @@ namespace Emby.Server.Implementations.Session /// /// The cancellation token. /// Task. - public Task SendServerShutdownNotification(CancellationToken cancellationToken) + public async Task SendServerShutdownNotification(CancellationToken cancellationToken) { CheckDisposed(); - CloseAllWebSockets(cancellationToken).ConfigureAwait(false); + await CloseAllWebSockets(cancellationToken).ConfigureAwait(false); - return SendMessageToSessions(Sessions, SessionMessageType.ServerShuttingDown, string.Empty, cancellationToken); + await SendMessageToSessions(Sessions, SessionMessageType.ServerShuttingDown, string.Empty, cancellationToken).ConfigureAwait(false); } ///