diff --git a/weather.go b/weather.go index 23ef3bb..ba11f69 100644 --- a/weather.go +++ b/weather.go @@ -9,7 +9,6 @@ import ( "net/url" "strconv" "strings" - "time" "go.elara.ws/infinitime" @@ -86,9 +85,12 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro go func() { defer wg.Done("weather") for { - _, ok := <-ctx.Done() - if !ok { - return + select { + case _, ok := <-ctx.Done(): + if !ok { + return + } + default: } // Attempt to get weather