diff --git a/src/component/internal/reconnector/index.ts b/src/component/internal/reconnector/index.ts index 91f73b36..709de7f9 100644 --- a/src/component/internal/reconnector/index.ts +++ b/src/component/internal/reconnector/index.ts @@ -110,7 +110,7 @@ export class Reconnector extends EventEmitter { public set config(conf: ReconnectorConfig) { this._config = { ...conf } - if (this._config.max_reconnects > this._total_reconnects) { + if (this._config.max_reconnects <= this._total_reconnects) { this.close(new Error('reconnection config changed')) } }