diff options
| author | Ronan Charles-Lorel <roro.roronoa@gmail.com> | 2023-06-29 15:08:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-29 15:08:52 +0200 |
| commit | e108183b138552013bbfd13c36937481228eb9e6 (patch) | |
| tree | 8e374adf35d64b157ac88e5b84a25d186bd4ccf1 /Emby.Server.Implementations/Session/WebSocketController.cs | |
| parent | 31ac861b8560547c7e0c46513077abf76e6bc618 (diff) | |
| parent | b5bbb98175e0542d43c01f80c15e8dce04e58b53 (diff) | |
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'Emby.Server.Implementations/Session/WebSocketController.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/WebSocketController.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Session/WebSocketController.cs b/Emby.Server.Implementations/Session/WebSocketController.cs index 051fa5b3c..cf8e0fb00 100644 --- a/Emby.Server.Implementations/Session/WebSocketController.cs +++ b/Emby.Server.Implementations/Session/WebSocketController.cs @@ -7,8 +7,8 @@ using System.Net.WebSockets; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Net; +using MediaBrowser.Controller.Net.WebSocketMessages; using MediaBrowser.Controller.Session; -using MediaBrowser.Model.Net; using MediaBrowser.Model.Session; using Microsoft.Extensions.Logging; @@ -69,9 +69,7 @@ namespace Emby.Server.Implementations.Session T data, CancellationToken cancellationToken) { - var socket = GetActiveSockets() - .OrderByDescending(i => i.LastActivityDate) - .FirstOrDefault(); + var socket = GetActiveSockets().MaxBy(i => i.LastActivityDate); if (socket is null) { @@ -79,7 +77,7 @@ namespace Emby.Server.Implementations.Session } return socket.SendAsync( - new WebSocketMessage<T> + new OutboundWebSocketMessage<T> { Data = data, MessageType = name, |
