fix keep alive (#12041)

This commit is contained in:
Michael Yang
2025-08-27 11:51:25 -07:00
committed by GitHub
parent 59412fbb43
commit 1081532430
3 changed files with 9 additions and 4 deletions

View File

@@ -888,7 +888,7 @@ func (d *Duration) UnmarshalJSON(b []byte) (err error) {
if t < 0 {
d.Duration = time.Duration(math.MaxInt64)
} else {
d.Duration = time.Duration(int(t) * int(time.Second))
d.Duration = time.Duration(t * float64(time.Second))
}
case string:
d.Duration, err = time.ParseDuration(t)