projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33400d8
)
[browser] don't propagate JS errors in WS abort (#90148)
author
Pavel Savara
<pavel.savara@gmail.com>
Tue, 8 Aug 2023 15:36:49 +0000
(17:36 +0200)
committer
GitHub
<noreply@github.com>
Tue, 8 Aug 2023 15:36:49 +0000
(17:36 +0200)
src/mono/wasm/runtime/web-socket.ts
patch
|
blob
|
history
diff --git
a/src/mono/wasm/runtime/web-socket.ts
b/src/mono/wasm/runtime/web-socket.ts
index
7d25310
..
7469d27
100644
(file)
--- a/
src/mono/wasm/runtime/web-socket.ts
+++ b/
src/mono/wasm/runtime/web-socket.ts
@@
-201,8
+201,12
@@
export function ws_wasm_abort(ws: WebSocketExtension): void {
// cleanup the delegate proxy
ws[wasm_ws_on_closed]?.dispose();
- // this is different from Managed implementation
- ws.close(1000, "Connection was aborted.");
+ try {
+ // this is different from Managed implementation
+ ws.close(1000, "Connection was aborted.");
+ } catch (error) {
+ mono_log_warn("WebSocket error while aborting", error);
+ }
}
function reject_promises(ws: WebSocketExtension, error: Error) {