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

@@ -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);
}
}