Fix web sockets closing ungracefully

This commit is contained in:
luke brown
2022-05-09 20:21:13 -05:00
parent 39196bb5e2
commit 4b563f4d7e
6 changed files with 55 additions and 0 deletions

View File

@@ -88,6 +88,18 @@ namespace Emby.Server.Implementations.Session
cancellationToken);
}
/// <summary>
/// Gracefully closes all web sockets.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
public void CloseAllWebSockets(CancellationToken cancellationToken)
{
foreach (var socket in _sockets)
{
socket.CloseSocket(cancellationToken);
}
}
/// <inheritdoc />
public void Dispose()
{