From 914fb89a4ae1128d8525e9038b80e1169801a16c Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 23 Dec 2023 12:31:57 +0100 Subject: [PATCH] Fix JavaScript error when a JSON-RPC response is generated while a chain is removed (#1512) * Fix bug * CHANGELOG --- wasm-node/CHANGELOG.md | 1 + wasm-node/javascript/src/internals/remote-instance.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 247d82c00a..ecc27b022b 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -12,6 +12,7 @@ - Fix state mismatch during warp syncing if a peer sends a bad header, justification, or proof. ([#1498](https://github.com/smol-dot/smoldot/pull/1498)) - Fix bugs in various corner cases when decoding and analyzing a Merkle proof. ([#1462](https://github.com/smol-dot/smoldot/pull/1462)) - Fix Merkle proofs being considered as invalid if they contain a storage value that happens to successfully decode as a trie node with an inline child. ([#1504](https://github.com/smol-dot/smoldot/pull/1504)) +- Fix crash when using a worker due to race condition when a chain is removed while a JSON-RPC response is generated for it. ([#1512](https://github.com/smol-dot/smoldot/pull/1512)) ## 2.0.15 - 2023-12-20 diff --git a/wasm-node/javascript/src/internals/remote-instance.ts b/wasm-node/javascript/src/internals/remote-instance.ts index 52e48a14f5..5b66f5e892 100644 --- a/wasm-node/javascript/src/internals/remote-instance.ts +++ b/wasm-node/javascript/src/internals/remote-instance.ts @@ -147,9 +147,10 @@ export async function connectToInstanceServer(config: ConnectConfig): Promise