aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
diff options
context:
space:
mode:
authorMarc Brooks <IDisposable@gmail.com>2025-02-03 19:48:59 -0600
committerGitHub <noreply@github.com>2025-02-03 19:48:59 -0600
commite8cbcde02ebd930a5eeb6c95e0875a9e30acb3e8 (patch)
tree2ecd43f232012c8f037f4cd6fee4168e46d01aa3 /Emby.Server.Implementations/Session/SessionWebSocketListener.cs
parent6dc61a430ba3a8480399309f277e5debfd6403ba (diff)
parentd376b5fbc7cf3ae7440a606a9e885d70605956bd (diff)
Merge branch 'master' into sort-nfo-data
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionWebSocketListener.cs')
-rw-r--r--Emby.Server.Implementations/Session/SessionWebSocketListener.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Session/SessionWebSocketListener.cs b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
index aba51de8f..d4606abd2 100644
--- a/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
+++ b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
@@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Session
/// <summary>
/// Lock used for accessing the WebSockets watchlist.
/// </summary>
- private readonly object _webSocketsLock = new object();
+ private readonly Lock _webSocketsLock = new();
private readonly ISessionManager _sessionManager;
private readonly ILogger<SessionWebSocketListener> _logger;
@@ -276,11 +276,11 @@ namespace Emby.Server.Implementations.Session
/// </summary>
/// <param name="webSocket">The WebSocket.</param>
/// <returns>Task.</returns>
- private Task SendForceKeepAlive(IWebSocketConnection webSocket)
+ private async Task SendForceKeepAlive(IWebSocketConnection webSocket)
{
- return webSocket.SendAsync(
+ await webSocket.SendAsync(
new ForceKeepAliveMessage(WebSocketLostTimeout),
- CancellationToken.None);
+ CancellationToken.None).ConfigureAwait(false);
}
}
}