Make sure socket closed is logged

This commit is contained in:
BrennanConroy 2017-09-15 08:49:18 -07:00
parent a267e86e1f
commit 9a67ac5341
1 changed files with 8 additions and 2 deletions

View File

@ -51,9 +51,15 @@ namespace Microsoft.AspNetCore.Sockets.Internal.Transports
{ {
_logger.SocketOpened(_connection.ConnectionId); _logger.SocketOpened(_connection.ConnectionId);
await ProcessSocketAsync(ws); try
{
await ProcessSocketAsync(ws);
}
finally
{
_logger.SocketClosed(_connection.ConnectionId);
}
} }
_logger.SocketClosed(_connection.ConnectionId);
} }
public async Task ProcessSocketAsync(WebSocket socket) public async Task ProcessSocketAsync(WebSocket socket)