Skip to content

Commit bf86002

Browse files
authored
Merge pull request #177 from crishoj/fix-catch-without-argument
fix: catch without argument does not suppress
2 parents 06fb33d + 7dcb551 commit bf86002

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ads-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ export class Client extends EventEmitter<AdsClientEvents> {
747747

748748
if (this.socket) {
749749
this.debug(`reconnectToTarget(): Trying to disconnect`);
750-
await this.disconnectFromTarget(forceDisconnect, isReconnecting).catch();
750+
await this.disconnectFromTarget(forceDisconnect, isReconnecting).catch(() => {});
751751
}
752752
this.debug(`reconnectToTarget(): Trying to connect...`);
753753
return this.connectToTarget(true)
@@ -1297,7 +1297,7 @@ export class Client extends EventEmitter<AdsClientEvents> {
12971297

12981298
if (this.settings.autoReconnect !== true) {
12991299
this.warn("Connection to target was lost and setting autoReconnect was false -> disconnecting");
1300-
await this.disconnectFromTarget(true).catch();
1300+
await this.disconnectFromTarget(true).catch(() => {});
13011301
return;
13021302
}
13031303

0 commit comments

Comments
 (0)