Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Runtime: ignore exception when closing a channel
Browse files Browse the repository at this point in the history
vouillon committed Dec 20, 2023
1 parent 6a6d736 commit 220e179
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runtime/wasm/io.wat
Original file line number Diff line number Diff line change
@@ -270,7 +270,12 @@
(struct.set $channel $fd (local.get $ch) (i32.const -1))
(call $unregister_channel (local.get $ch))
(call $release_fd_offset (local.get $fd))
(call $close (local.get $fd))))
(try
(do
(call $close (local.get $fd)))
(catch $javascript_exception
;; ignore exception
(drop (pop externref))))))
(ref.i31 (i32.const 0)))

(func $caml_do_read

0 comments on commit 220e179

Please sign in to comment.