fix(cluster): propagate abandonment to the RPC requester

This commit is contained in:
Tim Smart
2026-09-25 03:01:01 +00:00
parent 99aa6551e2
commit 5b9e71ba8d
+9 -1
View File
@@ -1285,10 +1285,18 @@ const make = Effect.gen(function*() {
readonly context?: Context.Context<never>
}) {
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, {