diff --git a/src/stream.ts b/src/stream.ts index cd4f8c4..a7cbce3 100644 --- a/src/stream.ts +++ b/src/stream.ts @@ -53,11 +53,13 @@ export class Streamer { this.eventBus.emit(Event.DISCONNECTED) this.disconnectEventEmitted = true } + if (this.reconnectAttempts >= 5 && this.reconnectAttempts % 5 === 0) { this.logErrorMessage( `Reconnection failed after ${this.reconnectAttempts} attempts; attempting further reconnections.` ) } + setTimeout(() => this.start(), reconnectDelayMs) }