fix(striker-ui-api): remove timeout on spawning access module child process

main
Tsu-ba-me 12 months ago
parent 4bb0a32764
commit 44a39c02f1
  1. 3
      striker-ui-api/src/lib/accessModule.ts
  2. 6
      striker-ui-api/src/types/AccessModule.d.ts

@ -59,7 +59,6 @@ class Access extends EventEmitter {
gid = PGID,
restartInterval = 10000,
stdio = 'pipe',
timeout = 10000,
uid = PUID,
...restSpawnOptions
}: AccessStartOptions = {}) {
@ -68,7 +67,6 @@ class Access extends EventEmitter {
gid,
restartInterval,
stdio,
timeout,
uid,
...restSpawnOptions,
};
@ -78,7 +76,6 @@ class Access extends EventEmitter {
const ps = spawn(SERVER_PATHS.usr.sbin['anvil-access-module'].self, args, {
gid,
stdio,
timeout,
uid,
...restSpawnOptions,
});

@ -1,3 +1,9 @@
/**
* Notes:
* - Option `timeout` for child_process.spawn was added in node15.13.0 to limit
* the lifespan of the child process; this is **not** the max wait time before
* the child process starts successfully.
*/
type AccessStartOptions = {
args?: readonly string[];
restartInterval?: number;

Loading…
Cancel
Save