Skip to content

Commit 519c6e6

Browse files
committed
Fix reconnect logging and memleak
1 parent 99b5ea4 commit 519c6e6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

packages/runner/src/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export class Runner<X extends AppConfig> implements IComponent {
257257
private handleSetRequest(data: SetMessageData) {
258258
if (data.logLevel) {
259259
this.logger.logLevel = data.logLevel;
260-
260+
261261
if (this._context)
262262
this._context.logger.logLevel = data.logLevel;
263263
}

packages/utility/src/typeguards/dto/instance-set.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function isStartSequenceDTO(arg: any): arg is StartSequenceDTO {
2727
return true;
2828
}
2929

30+
// eslint-disable-next-line complexity
3031
export function isStartSequenceEndpointPayloadDTO(arg: any): arg is StartSequenceEndpointPayloadDTO {
3132
if (typeof arg !== "object") {
3233
throw new Error("DTO is not an object");
@@ -41,7 +42,7 @@ export function isStartSequenceEndpointPayloadDTO(arg: any): arg is StartSequenc
4142
throw new Error("DTO instanceId is not valid string");
4243
}
4344
if (logLevel && !LogLevelStrings.includes(logLevel)) {
44-
throw new Error("DTO logLevel is not valid");
45+
throw new Error("DTO logLevel is not valid");
4546
}
4647
return true;
4748
}
@@ -53,9 +54,9 @@ export function isSetSequenceEndpointPayloadDTO(arg: any): arg is SetSequenceEnd
5354
const { logLevel, ...rest } = arg;
5455

5556
if (logLevel && !LogLevelStrings.includes(logLevel)) {
56-
throw new Error("DTO logLevel is not valid");
57+
throw new Error("DTO logLevel is not valid");
5758
}
58-
if (Object.values(rest).length > 0)
59+
if (Object.values(rest).length > 0)
5960
throw new Error(`DTO has unknown ${Object.keys(rest)} keys`);
6061

6162
return true;

packages/utility/src/typeguards/dto/sequence-start.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function isStartSequenceDTO(arg: any): arg is StartSequenceDTO {
2727
return true;
2828
}
2929

30+
// eslint-disable-next-line complexity
3031
export function isStartSequenceEndpointPayloadDTO(arg: any): arg is StartSequenceEndpointPayloadDTO {
3132
if (typeof arg !== "object") {
3233
throw new Error("DTO is not an object");
@@ -41,7 +42,7 @@ export function isStartSequenceEndpointPayloadDTO(arg: any): arg is StartSequenc
4142
throw new Error("DTO instanceId is not valid string");
4243
}
4344
if (logLevel && !LogLevelStrings.includes(logLevel)) {
44-
throw new Error("DTO logLevel is not valid");
45+
throw new Error("DTO logLevel is not valid");
4546
}
4647
return true;
4748
}

0 commit comments

Comments
 (0)