mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix reconnect config change.
This commit is contained in:
parent
1e78e4e191
commit
262ea3dd77
@ -110,7 +110,7 @@ export class Reconnector extends EventEmitter<ReconnectorEvents> {
|
||||
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'))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user