Revert "Fixed SessionWebSocketListener.OnServerManagerWebSocketConnected."
This commit is contained in:
parent
1a0d8aef80
commit
3ae39d44da
|
@ -58,7 +58,7 @@ namespace Jellyfin.Api.WebSocketListeners
|
|||
|
||||
private void OnEntryCreated(object? sender, GenericEventArgs<ActivityLogEntry> e)
|
||||
{
|
||||
SendData(true).GetAwaiter().GetResult();
|
||||
SendData(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,11 +82,10 @@ namespace Jellyfin.Server
|
|||
ServiceCollection.AddSingleton<IUserManager, UserManager>();
|
||||
ServiceCollection.AddSingleton<IDisplayPreferencesManager, DisplayPreferencesManager>();
|
||||
|
||||
ServiceCollection.AddScoped<IWebSocketListener, SessionWebSocketListener>();
|
||||
ServiceCollection.AddScoped<IWebSocketListener, ActivityLogWebSocketListener>();
|
||||
ServiceCollection.AddScoped<IWebSocketListener, ScheduledTasksWebSocketListener>();
|
||||
ServiceCollection.AddScoped<IWebSocketListener, SessionInfoWebSocketListener>();
|
||||
// This one has to be last as DI will select it for parameterization.
|
||||
ServiceCollection.AddScoped<IWebSocketListener, SessionWebSocketListener>();
|
||||
|
||||
// TODO fix circular dependency on IWebSocketManager
|
||||
ServiceCollection.AddScoped(serviceProvider => new Lazy<IEnumerable<IWebSocketListener>>(serviceProvider.GetRequiredService<IEnumerable<IWebSocketListener>>));
|
||||
|
|
|
@ -25,19 +25,8 @@ 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,
|
||||
#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
|
||||
public async Task Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
|
||||
{
|
||||
if (!httpContext.WebSockets.IsWebSocketRequest)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user