diff --git a/src/JsonRpc/InputHandler.cs b/src/JsonRpc/InputHandler.cs index 38f4d25c3..cf733ebd0 100644 --- a/src/JsonRpc/InputHandler.cs +++ b/src/JsonRpc/InputHandler.cs @@ -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; @@ -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)