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, gid = PGID,
restartInterval = 10000, restartInterval = 10000,
stdio = 'pipe', stdio = 'pipe',
timeout = 10000,
uid = PUID, uid = PUID,
...restSpawnOptions ...restSpawnOptions
}: AccessStartOptions = {}) { }: AccessStartOptions = {}) {
@ -68,7 +67,6 @@ class Access extends EventEmitter {
gid, gid,
restartInterval, restartInterval,
stdio, stdio,
timeout,
uid, uid,
...restSpawnOptions, ...restSpawnOptions,
}; };
@ -78,7 +76,6 @@ class Access extends EventEmitter {
const ps = spawn(SERVER_PATHS.usr.sbin['anvil-access-module'].self, args, { const ps = spawn(SERVER_PATHS.usr.sbin['anvil-access-module'].self, args, {
gid, gid,
stdio, stdio,
timeout,
uid, uid,
...restSpawnOptions, ...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 = { type AccessStartOptions = {
args?: readonly string[]; args?: readonly string[];
restartInterval?: number; restartInterval?: number;

Loading…
Cancel
Save