mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-08 10:44:23 -04:00
Replace redundant xml comments with inheritdoc. Make async changes to CloseSocket.
This commit is contained in:
parent
4b563f4d7e
commit
99df9c8fcd
@ -889,9 +889,9 @@ namespace Emby.Dlna.PlayTo
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CloseAllWebSockets(CancellationToken cancellationToken)
|
/// <inheritdoc />
|
||||||
|
public async Task CloseAllWebSockets(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class StreamParams
|
private class StreamParams
|
||||||
|
@ -231,13 +231,10 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
CancellationToken.None);
|
CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// Gracefully closes the socket.
|
public async Task CloseSocket(CancellationToken cancellationToken)
|
||||||
/// </summary>
|
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
|
||||||
public void CloseSocket(CancellationToken cancellationToken)
|
|
||||||
{
|
{
|
||||||
_socket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "System Shutdown", cancellationToken);
|
await _socket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "System Shutdown", cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
@ -1363,7 +1363,7 @@ namespace Emby.Server.Implementations.Session
|
|||||||
{
|
{
|
||||||
CheckDisposed();
|
CheckDisposed();
|
||||||
|
|
||||||
CloseAllWebSockets(cancellationToken);
|
CloseAllWebSockets(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
return SendMessageToSessions(Sessions, SessionMessageType.ServerShuttingDown, string.Empty, cancellationToken);
|
return SendMessageToSessions(Sessions, SessionMessageType.ServerShuttingDown, string.Empty, cancellationToken);
|
||||||
}
|
}
|
||||||
@ -1372,13 +1372,13 @@ namespace Emby.Server.Implementations.Session
|
|||||||
/// Gracefully closes all web sockets in all sessions.
|
/// Gracefully closes all web sockets in all sessions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
private void CloseAllWebSockets(CancellationToken cancellationToken)
|
private async Task CloseAllWebSockets(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
foreach (var session in Sessions)
|
foreach (var session in Sessions)
|
||||||
{
|
{
|
||||||
foreach (var sessionController in session.SessionControllers)
|
foreach (var sessionController in session.SessionControllers)
|
||||||
{
|
{
|
||||||
sessionController.CloseAllWebSockets(cancellationToken);
|
await sessionController.CloseAllWebSockets(cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,15 +88,12 @@ namespace Emby.Server.Implementations.Session
|
|||||||
cancellationToken);
|
cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// Gracefully closes all web sockets.
|
public async Task CloseAllWebSockets(CancellationToken cancellationToken)
|
||||||
/// </summary>
|
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
|
||||||
public void CloseAllWebSockets(CancellationToken cancellationToken)
|
|
||||||
{
|
{
|
||||||
foreach (var socket in _sockets)
|
foreach (var socket in _sockets)
|
||||||
{
|
{
|
||||||
socket.CloseSocket(cancellationToken);
|
await socket.CloseSocket(cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ namespace MediaBrowser.Controller.Net
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gracefully closes the socket.
|
/// Gracefully closes the socket.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <returns>Task.</returns>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
void CloseSocket(CancellationToken cancellationToken);
|
Task CloseSocket(CancellationToken cancellationToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ namespace MediaBrowser.Controller.Session
|
|||||||
/// Gracefully closes all web sockets.
|
/// Gracefully closes all web sockets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
void CloseAllWebSockets(CancellationToken cancellationToken);
|
/// <returns>A task.</returns>
|
||||||
|
Task CloseAllWebSockets(CancellationToken cancellationToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user