Fixed SessionWebSocketListener.OnServerManagerWebSocketConnected.

This commit is contained in:
Greenback
2020-11-27 23:04:13 +00:00
parent c98c2ab955
commit a59aeb12e0
3 changed files with 15 additions and 3 deletions

View File

@@ -25,8 +25,19 @@ namespace Jellyfin.Server.Middleware
/// </summary>
/// <param name="httpContext">The current HTTP context.</param>
/// <param name="webSocketManager">The WebSocket connection manager.</param>
/// <param name="websocketListener">Session manager instance.</param>
/// <returns>The async task.</returns>
public async Task Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
public async Task Invoke(
HttpContext httpContext,
IWebSocketManager webSocketManager,
#pragma warning disable CA1801
#pragma warning disable IDE0060
// TODO: Workaround. see https://github.com/jellyfin/jellyfin/pull/3194
// Do not remove this parameter. It uses DI to create a SessionWebSocketListener which is
// required for webSocketManager events.
IWebSocketListener websocketListener)
#pragma warning restore IDE0060 // Remove unused parameter
#pragma warning restore CA1801
{
if (!httpContext.WebSockets.IsWebSocketRequest)
{