Code polish

This commit is contained in:
David Majdandžić
2023-03-31 20:24:59 +02:00
parent fb310fa53a
commit 5b26dd6a61
9 changed files with 26 additions and 20 deletions

View File

@@ -175,10 +175,6 @@ export class Client extends SmppSession {
});
}
getUrl(): string {
return this.url;
}
private connectSession(): Promise<void> {
return new Promise<void>((resolve, reject) => {
this.validateFields(reject);
@@ -198,11 +194,13 @@ export class Client extends SmppSession {
this.setStatus(2);
if (this.connectPromise) {
this.connectPromise.resolve();
} else {
this.logger.log1(`Client-${this.id} connected without connect promise`);
}
}
private eventSessionError(pdu: PDU): void {
this.logger.log1(`Client-${this.id} error on ${this.url}`);
private eventSessionError(pdu: any): void {
this.logger.log1(`Client-${this.id} error on ${this.url} - ${pdu.message}`);
this.setStatus(0);
this.rejectPromises();
}