Skip to content

Commit

Permalink
Runtime: ignore exception when closing a channel
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Dec 20, 2023
1 parent 13536aa commit b7eeca1
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
Expand Up @@ -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
Expand Down

0 comments on commit b7eeca1

Please sign in to comment.