From 262ea3dd77a2ad900b3bd87498a7534ebd708509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Fri, 30 Jul 2021 22:36:55 +0200 Subject: [PATCH] fix reconnect config change. --- src/component/internal/reconnector/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')) } }