aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Session')
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs4
-rw-r--r--Emby.Server.Implementations/Session/WebSocketController.cs8
2 files changed, 5 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index afa3721b8..5f6dc93fb 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -606,7 +606,7 @@ namespace Emby.Server.Implementations.Session
}
catch (Exception ex)
{
- _logger.LogDebug("Error calling OnPlaybackStopped", ex);
+ _logger.LogDebug(ex, "Error calling OnPlaybackStopped");
}
}
@@ -953,7 +953,7 @@ namespace Emby.Server.Implementations.Session
}
catch (Exception ex)
{
- _logger.LogError("Error closing live stream", ex);
+ _logger.LogError(ex, "Error closing live stream");
}
}
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,