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.
This commit is contained in:
James Kinsman 2022-08-08 14:22:41 +01:00 committed by GitHub
parent cdfb336651
commit faedcd0210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1133,7 +1133,9 @@ const UI = {
} else { } else {
UI.showStatus(_("Failed to connect to server"), 'error'); 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'); UI.updateVisualState('reconnecting');
const delay = parseInt(UI.getSetting('reconnect_delay')); const delay = parseInt(UI.getSetting('reconnect_delay'));