aboutsummaryrefslogtreecommitdiff
path: root/src/server/Session/session.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-06 01:04:15 -0800
committerSam Wilkins <samwilkins333@gmail.com>2020-01-06 01:04:15 -0800
commite4d9fd09f6ede20e79d58119d239bb7a3a7dae25 (patch)
tree3a84f48ee369e950799b336bc87b16268cbc91cb /src/server/Session/session.ts
parent11000d8959c62772374577fadd9b282c92823a2c (diff)
optional
Diffstat (limited to 'src/server/Session/session.ts')
-rw-r--r--src/server/Session/session.ts10
1 files changed, 5 insertions, 5 deletions
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<boolean>;
- crash: (error: Error) => boolean | Promise<boolean>;
+ key?: (key: string) => boolean | Promise<boolean>;
+ crash?: (error: Error) => boolean | Promise<boolean>;
}
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<MasterCustomizer> {
+ export async function initializeMonitorThread(notifiers?: NotifierHooks): Promise<MasterExtensions> {
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();