Fix indentation and use setTimeout instead of setInterval.
parent
817ee3158e
commit
935e1f5909
|
@ -55,10 +55,10 @@ export default class UnavailableModalUiHandler extends ModalUiHandler {
|
|||
else {
|
||||
clearInterval(this.reconnectTimer);
|
||||
this.reconnectInterval *= 2;
|
||||
if (this.reconnectInterval >= 60000) {
|
||||
if (this.reconnectInterval > 60000) {
|
||||
this.reconnectInterval = 60000; // 1 minute maximum delay.
|
||||
}
|
||||
this.reconnectTimer = setInterval(this.tryReconnect, this.reconnectInterval);
|
||||
this.reconnectTimer = setTimeout(this.tryReconnect, this.reconnectInterval);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue