Skip to content

Commit

Permalink
Handle websocket exception when recieving (fixes #422)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaakov-h committed Aug 2, 2017
1 parent e48c5ff commit f9c83ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SteamKit2/SteamKit2/Networking/Steam3/WebSocketContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ async Task<byte[]> ReadMessageAsync(CancellationToken cancellationToken)
DisconnectNonBlocking(userInitiated: cancellationToken.IsCancellationRequested);
return null;
}
catch (WebSocketException)
{
DisconnectNonBlocking(userInitiated: false);
return null;
}
catch (Win32Exception)
{
DisconnectNonBlocking(userInitiated: false);
Expand Down

0 comments on commit f9c83ff

Please sign in to comment.