diff --git a/src/index.ts b/src/index.ts index 591c843..cb15cae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -182,7 +182,7 @@ export function createBirpc( setTimeout(() => { reject(new Error(`[birpc] timeout on calling "${method}"`)) rpcPromiseMap.delete(id) - }, timeout) + }, timeout).unref?.() } }) }