Skip to content

Commit

Permalink
fix: setTimeout causes process hangs
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Aug 20, 2023
1 parent 7b1fe90 commit 6a47001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export function createBirpc<RemoteFunctions = {}, LocalFunctions = {}>(
setTimeout(() => {
reject(new Error(`[birpc] timeout on calling "${method}"`))
rpcPromiseMap.delete(id)
}, timeout)
}, timeout).unref?.()
}
})
}
Expand Down

0 comments on commit 6a47001

Please sign in to comment.