better code: single instance, better be right in place
Massimo Melina committed
Apr 23, 2024 at 20:09 UTC
d33426c86c996285a5ec9021cba08528f0671db0
2 files changed
+2
-2
admin/src/HomePage.ts
+2
-1
@@ -142,7 +142,8 @@ function renderChangelog(s: string) {
142
async function update(tag?: string) {
143
if (!await confirmDialog("Installation may take less than a minute, depending on the speed of your server")) return
144
toast('Downloading')
145
- const err = await apiCall('update', { tag }).then(() => 0, e => e)
145
+ const err = await apiCall('update', { tag }, { timeout: 600 /*download can be lengthy*/ })
146
+ .then(() => 0, e => e)
147
if (err)
148
return alertDialog(err)
149
toast("Restarting")
shared/api.ts
-1
@@ -8,7 +8,6 @@ export const API_URL = '/~/api/'
8
9
const timeoutByApi: Dict = {
10
loginSrp1: 90, // support antibrute
11
- update: 600, // download can be lengthy
11
get_status: 20, // can be lengthy on slow machines because of the find-process-on-busy-port feature
12
}
13