fix: handle error from http.ListenAndServe in SteamCache
All checks were successful
CI / Lint (push) Successful in 7s
CI / Build (push) Successful in 13s
CI / Test (push) Successful in 59s

This commit is contained in:
2025-01-21 15:24:08 -06:00
parent d39a2ad4fa
commit 1f588fa20a

View File

@@ -80,16 +80,17 @@ func (sc *SteamCache) Run() {
sc.mu.Unlock()
sc.LogStats()
t := time.NewTicker(10 * time.Second)
go func() {
for range t.C {
// log cache stats
sc.LogStats()
}
}()
http.ListenAndServe(sc.address, sc)
err := http.ListenAndServe(sc.address, sc)
if err != nil {
log.Fatal(err)
}
}
func (sc *SteamCache) LogStats() {