Skip to content

Commit

Permalink
Merge pull request #955 from ycholette/Don't-log-critical-message-whe…
Browse files Browse the repository at this point in the history
…n-client-disconnect

Don't log critical message when client disconnect
  • Loading branch information
JoeRobich authored Oct 26, 2023
2 parents 31dcf23 + 793e66d commit a381bd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/JsonRpc/InputHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using System.IO.Pipelines;
using System.Linq;
using System.Net.Sockets;
using System.Reactive;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
Expand Down Expand Up @@ -144,9 +145,14 @@ public void Start()
{
await ProcessInputStream(_stopProcessing.Token).ConfigureAwait(false);
}
catch (IOException e)
when (e.InnerException is SocketException { SocketErrorCode: SocketError.ConnectionReset })
{
_logger.LogInformation(e, "Connection reset by client.");
}
catch (Exception e)
{
_logger.LogCritical(e, "unhandled exception");
_logger.LogCritical(e, "Unhandled exception.");
}
}
).Subscribe(_inputActive)
Expand Down

0 comments on commit a381bd3

Please sign in to comment.