We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12ff5c9 commit 0cf8d04Copy full SHA for 0cf8d04
src/robot/client.ts
@@ -351,9 +351,18 @@ export class RobotClient extends EventDispatcher implements Robot {
351
// eslint-disable-next-line no-console
352
console.debug('Reconnected successfully!');
353
})
354
- .catch(() => {
+ .catch((error) => {
355
+ if (
356
+ this.reconnectMaxAttempts !== undefined &&
357
+ this.currentRetryAttempt >= this.reconnectMaxAttempts
358
+ ) {
359
+ // eslint-disable-next-line no-console
360
+ console.debug(`Reached max attempts: ${this.reconnectMaxAttempts}`);
361
+ return;
362
+ }
363
+
364
- console.debug(`Reached max attempts: ${this.reconnectMaxAttempts}`);
365
+ console.error(error);
366
});
367
}
368
0 commit comments