src/packages/EmbedIO/WebSockets/WebSocketModule.cs
/// <summary>
/// Closes the specified web socket, removes it and disposes it.
/// </summary>
/// <param name="context">The web socket.</param>
/// <returns>A <see cref="Task"/> representing the ongoing operation.</returns>
Closes the specified web socket, removes it and disposes it.
Closes the specified web socket removes it and disposes it .
protected async Task CloseAsync(IWebSocketContext context)
        {
            if (context == null)
                return;
            try
            {
                await context.WebSocket.CloseAsync(context.CancellationToken).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                ex.Log(nameof(WebSocketModule));
            }
            finally
            {
                RemoveWebSocket(context);
            }
        }
protected async Task CloseAsync ( IWebSocketContext context ) { if ( context == null ) return ; try { await context . WebSocket . CloseAsync ( context . CancellationToken ) . ConfigureAwait ( false ) ; } catch ( Exception ex ) { ex . Log ( nameof ( WebSocketModule ) ) ; } finally { RemoveWebSocket ( context ) ; } }
Closes the specified web socket, removes it and disposes it.
Closes the specified web socket removes it and disposes it .
A  representing the ongoing operation.
A representing the ongoing operation .
context
IWebSocketContext
The web socket.
The web socket .