From 1f588fa20ac3c8454221c10c3dfa711716306100 Mon Sep 17 00:00:00 2001 From: Justin Harms Date: Tue, 21 Jan 2025 15:24:08 -0600 Subject: [PATCH] fix: handle error from http.ListenAndServe in SteamCache --- steamcache/steamcache.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/steamcache/steamcache.go b/steamcache/steamcache.go index ecf9c35..cefbfdb 100644 --- a/steamcache/steamcache.go +++ b/steamcache/steamcache.go @@ -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() {