diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index 7d4e02f24c..28ce08ff53 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -762,6 +762,10 @@ public async Task WaitForRenderIdleAsync(int idleTimeInMs = 500, TimeSpan? timeo // the same time, the timer maybe Disposed on a different thread. // https://github.com/cefsharp/CefSharp/issues/4597 } + catch(Exception ex) + { + renderIdleTcs.TrySetException(ex); + } }; idleTimer.Start(); diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index 3af233711f..4358c0606b 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -2754,6 +2754,10 @@ public async Task WaitForRenderIdleAsync(int idleTimeInMs = 500, TimeSpan? timeo // the same time, the timer maybe Disposed on a different thread. // https://github.com/cefsharp/CefSharp/issues/4597 } + catch (Exception ex) + { + renderIdleTcs.TrySetException(ex); + } }; idleTimer.Start();