fix too long long on non functionnal networt (and improve dwl)

This commit is contained in:
fatalerrors
2026-05-07 11:52:53 +02:00
parent ddd7d4193a
commit e64a857a43
2 changed files with 60 additions and 24 deletions

View File

@@ -90,9 +90,14 @@ check_updates()
return 4
}
dwl "$UPDT_URL/version" "$vfile" >/dev/null 2>&1 || {
# In quiet mode (startup), use a short timeout so a missing or slow network
# never blocks the interactive prompt.
local dwl_opts=()
(( quiet == 1 )) && dwl_opts+=(-t 3)
dwl "${dwl_opts[@]}" "$UPDT_URL/version" "$vfile" >/dev/null 2>&1 || {
rm -f "$vfile"
disp E "Cannot download version file; unable to continue."
(( quiet != 1 )) && disp E "Cannot download version file; unable to continue."
return 5
}