From e841439d102b54225fdc699e12fb49f34ff04a83 Mon Sep 17 00:00:00 2001 From: Wessie Date: Mon, 13 May 2024 21:50:43 +0100 Subject: [PATCH] tracker: use the calculation instead of the result from last commit --- tracker/parser.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tracker/parser.go b/tracker/parser.go index a633328..4fb44cf 100644 --- a/tracker/parser.go +++ b/tracker/parser.go @@ -4,6 +4,7 @@ import ( "encoding/xml" "fmt" "io" + "math" "strconv" "time" @@ -57,7 +58,7 @@ func ParseListClientsXML(r io.Reader) ([]radio.Listener, error) { if err != nil { return nil, err } - if div > 9223372036 { + if div > math.MaxInt64/int64(time.Second) { return nil, fmt.Errorf("connected duration out of range") } start := now.Add(-time.Duration(div) * time.Second)