Skip to content

Commit

Permalink
Fix potential unobserved exception in InputHandler.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickcholette committed Aug 12, 2021
1 parent 5281160 commit e70890d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/JsonRpc/InputHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,16 @@ IScheduler scheduler
public void Start()
{
_disposable.Add(
Observable.FromAsync(() => ProcessInputStream(_stopProcessing.Token))
.Do(_ => { }, e => _logger.LogCritical(e, "unhandled exception"))
.Subscribe(_inputActive)
Observable.FromAsync(async () => {
try
{
await ProcessInputStream(_stopProcessing.Token).ConfigureAwait(false);
}
catch (Exception e)
{
_logger.LogCritical(e, "unhandled exception");
}
}).Subscribe(_inputActive)
);
_disposable.Add(
_inputQueue
Expand Down

0 comments on commit e70890d

Please sign in to comment.