From 5b9e71ba8d7f877b040cf4e65a79f8bf22b60f4e Mon Sep 17 00:00:00 2001 From: Tim Smart Date: Fri, 11 Sep 2026 06:34:57 +0000 Subject: [PATCH] fix(cluster): propagate abandonment to the RPC requester --- packages/cluster/src/Sharding.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/cluster/src/Sharding.ts b/packages/cluster/src/Sharding.ts index 906da99355..b7c42a92e2 100644 --- a/packages/cluster/src/Sharding.ts +++ b/packages/cluster/src/Sharding.ts @@ -1285,10 +1285,18 @@ const make = Effect.gen(function*() { readonly context?: Context.Context }) { const context = options?.context ? Context.merge(options.context, address) : address - return client.client(tag, payload, { + const response = client.client(tag, payload, { ...options, context }) + // RpcClient relays write-fiber failures as causes. Restore abandonment + // on the requester before user recovery, without overriding its mask. + return Effect.isEffect(response) + ? Effect.onError( + response, + (cause) => ClusterAbandon.isCause(cause) ? ClusterAbandon.interrupt : Effect.void + ) + : response } const proxyClient: any = {} return new Proxy(proxyClient, {