@cortexkit/common-auth 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rpc/rpc-server.js +4 -0
- package/package.json +1 -1
package/dist/rpc/rpc-server.js
CHANGED
|
@@ -61,6 +61,10 @@ async function withDeadline(work, ms) {
|
|
|
61
61
|
let timer;
|
|
62
62
|
const deadline = new Promise((_, reject) => {
|
|
63
63
|
timer = setTimeout(() => reject(new ApplyDeadlineError('apply deadline exceeded')), ms);
|
|
64
|
+
// The deadline only bounds a reply. While a request is open its socket
|
|
65
|
+
// keeps the process alive anyway; after stop() closes it, a handler that
|
|
66
|
+
// never settles must not hold the process open until the deadline.
|
|
67
|
+
timer.unref?.();
|
|
64
68
|
});
|
|
65
69
|
// A handler that fails after its deadline has nobody left to answer.
|
|
66
70
|
work.catch(() => { });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/common-auth",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Shared code for the CortexKit auth plugins: account pool, quota and routing, commands and auth menu, OpenCode 2 hooks, Claustrum custody, and plumbing (loopback RPC, file locks, logger, sidebar state, TUI preferences and build).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|