Fix unused ex warnings in websockets (#1001)

This commit is contained in:
MrGadget 2019-08-04 13:29:25 -04:00 committed by vis2k
parent 2d25c4b06f
commit b9951f9ca7
2 changed files with 4 additions and 4 deletions

View File

@ -139,7 +139,7 @@ public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byt
frame = await WebSocketFrameReader.ReadAsync(_stream, buffer, linkedCts.Token);
Events.Log.ReceivedFrame(_guid, frame.OpCode, frame.IsFinBitSet, frame.Count);
}
catch (SocketException ex)
catch (SocketException)
{
// do nothing, the socket has been disconnected
}
@ -545,11 +545,11 @@ async Task WriteStreamToNetwork(MemoryStream stream, CancellationToken cancellat
await _stream.WriteAsync(_buf.Array, _buf.Offset, _buf.Count, cancellationToken).ConfigureAwait(false);
}
}
catch (IOException ex)
catch (IOException)
{
// do nothing, the socket is not connected
}
catch (SocketException ex)
catch (SocketException)
{
// do nothing, the socket is not connected
}

View File

@ -143,7 +143,7 @@ async void ProcessTcpClient(TcpClient tcpClient, CancellationToken token)
}
}
catch(IOException ex)
catch(IOException)
{
// do nothing. This will be thrown if the transport is closed
}