mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 11:22:49 +03:00
Use a simple backoff for retrying the update
- Not sleeping might be too fast for the DNS server to restart - Fix the link to the issue
This commit is contained in:
parent
9fb6bf82c7
commit
39268c754a
@ -9,6 +9,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/sysutil"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/update"
|
||||
@ -46,7 +47,8 @@ func handleGetVersionJSON(w http.ResponseWriter, r *http.Request) {
|
||||
Context.controlLock.Unlock()
|
||||
if err != nil && strings.HasSuffix(err.Error(), "i/o timeout") {
|
||||
// This case may happen while we're restarting DNS server
|
||||
// https://github.com/AdguardTeam/AdGuardHome/internal/issues/934
|
||||
// https://github.com/AdguardTeam/AdGuardHome/issues/934
|
||||
time.Sleep(time.Duration(i) * time.Second)
|
||||
continue
|
||||
}
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user