From a2632c86b1ddceae588886c7623a86f46e6098d5 Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Thu, 30 Sep 2021 19:52:58 +0200 Subject: fix: Don't panic when a worker is closed in the reactions to a wasm operation. (#12270) --- core/runtime.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/runtime.rs') diff --git a/core/runtime.rs b/core/runtime.rs index 9a60a65ed..ffd8e49c5 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -1572,6 +1572,10 @@ impl JsRuntime { return exception_to_err_result(tc_scope, exception, false); } + if tc_scope.has_terminated() || tc_scope.is_execution_terminating() { + break; + } + let is_done = is_done.unwrap(); if is_done.is_true() { break; -- cgit v1.2.3