summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Kinsman <VibroAxe@users.noreply.github.com>2022-08-08 14:22:41 +0100
committerGitHub <noreply@github.com>2022-08-08 14:22:41 +0100
commitfaedcd0210c810be925d64ed77172ef4433ad7eb (patch)
treee45ff6e0f0a440d1234f761bf60f00595348b291
parentcdfb33665195eb9a73fb00feb6ebaccd1068cd50 (diff)
downloadnovnc-faedcd0210c810be925d64ed77172ef4433ad7eb.tar.gz
Allow continued reconnect tries
Currently novnc will only retry once (assuming the server is unavailable) and then stop (as the detail from is unclean, usually "failed to connect"). Minor change will continue to reconnect every reconnect_delay seconds until either reconnected or user intervention cancels the attempt.
-rw-r--r--app/ui.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/ui.js b/app/ui.js
index 95f938d..fe62ede 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1133,7 +1133,9 @@ const UI = {
} else {
UI.showStatus(_("Failed to connect to server"), 'error');
}
- } else if (UI.getSetting('reconnect', false) === true && !UI.inhibitReconnect) {
+ }
+ // If reconnecting is allowed process it now
+ if (UI.getSetting('reconnect', false) === true && !UI.inhibitReconnect) {
UI.updateVisualState('reconnecting');
const delay = parseInt(UI.getSetting('reconnect_delay'));