mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-25 18:16:56 +01:00
Fix web sockets closing ungracefully
This commit is contained in:
@@ -58,5 +58,11 @@ namespace MediaBrowser.Controller.Net
|
||||
Task SendAsync<T>(WebSocketMessage<T> message, CancellationToken cancellationToken);
|
||||
|
||||
Task ProcessAsync(CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gracefully closes the socket.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void CloseSocket(CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,5 +33,11 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="cancellationToken">CancellationToken for operation.</param>
|
||||
/// <returns>A task.</returns>
|
||||
Task SendMessage<T>(SessionMessageType name, Guid messageId, T data, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gracefully closes all web sockets.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void CloseAllWebSockets(CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user