all: partially sync with master; upd chlog

This commit is contained in:
Ainar Garipov 2024-03-06 18:33:53 +03:00
parent 48d1c673a9
commit fbc0d981ba
71 changed files with 557 additions and 210 deletions
internal/home

View file

@ -15,7 +15,6 @@ import (
"github.com/AdguardTeam/AdGuardHome/internal/version"
"github.com/AdguardTeam/golibs/httphdr"
"github.com/AdguardTeam/golibs/log"
"github.com/AdguardTeam/golibs/mathutil"
"github.com/AdguardTeam/golibs/netutil"
"github.com/NYTimes/gziphandler"
)
@ -145,7 +144,7 @@ func handleStatus(w http.ResponseWriter, r *http.Request) {
// Make sure that we don't send negative numbers to the frontend,
// since enough time might have passed to make the difference less
// than zero.
protectionDisabledDuration = mathutil.Max(
protectionDisabledDuration = max(
0,
time.Until(*protectionDisabledUntil).Milliseconds(),
)