Skip to content

Commit

Permalink
Fix potential unobserved exception in InputHandler.cs (#635)
Browse files Browse the repository at this point in the history
Co-authored-by: Yannick Cholette <yannick.cholette@ubisoft.com>
  • Loading branch information
ycholette and yannickcholette authored Aug 24, 2021
1 parent 89a97d1 commit de1591e
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 de1591e

Please sign in to comment.