diff --git a/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs b/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs index 5e37d0e96..ef9d8a79b 100644 --- a/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs +++ b/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs @@ -188,6 +188,11 @@ private async Task RunConsoleMessagesPump(WebSocket socket, CancellationToken to } } } + catch (WebSocketException wse) + { + // this could happen when WebWorker is closed or when browser died + _logger.LogDebug($"RunConsoleMessagesPump failed: {wse}"); + } catch (OperationCanceledException oce) { if (!token.IsCancellationRequested)