From e4d9fd09f6ede20e79d58119d239bb7a3a7dae25 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Mon, 6 Jan 2020 01:04:15 -0800 Subject: optional --- src/server/Session/session.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/server/Session/session.ts b/src/server/Session/session.ts index 5c74af511..cf2231b1f 100644 --- a/src/server/Session/session.ts +++ b/src/server/Session/session.ts @@ -42,14 +42,14 @@ export namespace Session { pollingIntervalSeconds: 30 }; - interface MasterCustomizer { + interface MasterExtensions { addReplCommand: (basename: string, argPatterns: (RegExp | string)[], action: ReplAction) => void; addChildMessageHandler: (message: string, handler: ActionHandler) => void; } export interface NotifierHooks { - key: (key: string) => boolean | Promise; - crash: (error: Error) => boolean | Promise; + key?: (key: string) => boolean | Promise; + crash?: (error: Error) => boolean | Promise; } export interface SessionAction { @@ -119,7 +119,7 @@ export namespace Session { * Validates and reads the configuration file, accordingly builds a child process factory * and spawns off an initial process that will respawn as predecessors die. */ - export async function initializeMonitorThread(notifiers?: NotifierHooks): Promise { + export async function initializeMonitorThread(notifiers?: NotifierHooks): Promise { let activeWorker: Worker; const childMessageHandlers: { [message: string]: (action: SessionAction, args: any) => void } = {}; @@ -181,7 +181,7 @@ export namespace Session { }; const setPort = (port: string, value: number, immediateRestart: boolean) => { - if (value >= 1024 && value <= 65535) { + if (value > 1023 && value < 65536) { ports[port] = value; if (immediateRestart) { restart(); -- cgit v1.2.3-70-g09d2