fix(geoip-update): back off failed downloads

This commit is contained in:
AJ ONeal 2026-09-08 14:44:48 -06:00
parent 71f7752015
commit 05505c3554
No known key found for this signature in database

View File

@ -35,10 +35,12 @@ func printVersion(w io.Writer) {
_, _ = fmt.Fprintf(w, "Licensed under %s\n", licenseType)
}
const defaultFailureBackoff = 6 * time.Hour
type Config struct {
ConfPath string
Dir string
BaseURL string
ConfPath string
Dir string
BaseURL string
FreshDays int
}
@ -114,6 +116,7 @@ func main() {
path,
)
cacher.MaxAge = maxAge
cacher.FailureBackoff = defaultFailureBackoff
cacher.Header = authHeader
fmt.Fprintf(os.Stderr, "Fetching %s... ", edition)
t := time.Now()