fix: admin/config: using a busy port could display generic error message

Massimo Melina committed Jun 1, 2022 at 11:06 UTC 1d9cf4fa7e189e941c2a3ca257fc7b2b16333d28
1 file changed +1 -1
admin/src/ConfigPage.ts
+1 -1
@@ -133,7 +133,7 @@ export default function ConfigPage() {
133 await alertDialog("You are being redirected but in some cases this may fail. Hold on tight!", 'warning')
134 return window.location.href = loc.protocol + '//' + loc.hostname + ':' + newPort + loc.pathname
135 }
136 - setTimeout(reloadStatus, 1000)
136 + setTimeout(reloadStatus, 2000) // in case of busy port, finding the name of the process can be a lengthy task. Worst case we'll get the generic error message
137 Object.assign(loaded, values) // since changes are recalculated subscribing state.config, but it depends on 'loaded' to (which cannot be subscribed), be sure to update loaded first
138 recalculateChanges()
139 toast("Changes applied", 'success')