Add a maximum delay of 5 minutes, and compliance fixup.

pull/628/head
Jesse Selover 2024-05-08 02:46:07 -07:00
parent 732d0ee66a
commit af48bea179
1 changed files with 4 additions and 1 deletions

View File

@ -55,7 +55,10 @@ export default class UnavailableModalUiHandler extends ModalUiHandler {
else { else {
clearInterval(this.reconnectTimer); clearInterval(this.reconnectTimer);
this.reconnectInterval *= 2; this.reconnectInterval *= 2;
this.reconnectTimer = setInterval(this.tryReconnect, reconnectInterval); if (this.reconnectInterval >= 300000) {
this.reconnectInterval = 300000; // 300 seconds (5 minutes) maximum delay.
}
this.reconnectTimer = setInterval(this.tryReconnect, this.reconnectInterval);
} }
}); });
} }