Skip to content

Commit

Permalink
tracker: use the calculation instead of the result from last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed May 13, 2024
1 parent 7041f9d commit e841439
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tracker/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/xml"
"fmt"
"io"
"math"
"strconv"
"time"

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e841439

Please sign in to comment.