mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
infinite reconnects for -1 value.
This commit is contained in:
parent
48630e57b7
commit
7be220c2d2
@ -165,7 +165,7 @@ export class Reconnector extends EventEmitter<ReconnectorEvents> {
|
||||
|
||||
this._total_reconnects++
|
||||
|
||||
if (this._config.max_reconnects > this._total_reconnects || this._total_reconnects < 0) {
|
||||
if (this._config.max_reconnects > this._total_reconnects || this._config.max_reconnects == -1) {
|
||||
this._timeout = window.setTimeout(this.connect.bind(this), this._config.backoff_ms)
|
||||
} else {
|
||||
this.close(new Error('reconnection failed'))
|
||||
|
Loading…
Reference in New Issue
Block a user