import fix for time handling infinite loop see https://github.com/SlyMarbo/rss/issues/84
Jes Olson j3s@c3f.net
Sun, 21 Apr 2024 11:17:37 -0400
2 files changed,
4 insertions(+),
4 deletions(-)
M
rss/rss_1.0.go
→
rss/rss_1.0.go
@@ -35,7 +35,7 @@ sort.Ints(channel.SkipHours)
next := time.Now().Add(time.Duration(channel.MinsToLive) * time.Minute) for _, hour := range channel.SkipHours { if hour == next.Hour() { - next.Add(time.Duration(60-next.Minute()) * time.Minute) + next = next.Add(time.Duration(60-next.Minute()) * time.Minute) } } trying := true@@ -43,7 +43,7 @@ for trying {
trying = false for _, day := range channel.SkipDays { if strings.Title(day) == next.Weekday().String() { - next.Add(time.Duration(24-next.Hour()) * time.Hour) + next = next.Add(time.Duration(24-next.Hour()) * time.Hour) trying = true break }
M
rss/rss_2.0.go
→
rss/rss_2.0.go
@@ -43,7 +43,7 @@ sort.Ints(channel.SkipHours)
next := time.Now().Add(time.Duration(channel.MinsToLive) * time.Minute) for _, hour := range channel.SkipHours { if hour == next.Hour() { - next.Add(time.Duration(60-next.Minute()) * time.Minute) + next = next.Add(time.Duration(60-next.Minute()) * time.Minute) } } trying := true@@ -51,7 +51,7 @@ for trying {
trying = false for _, day := range channel.SkipDays { if strings.Title(day) == next.Weekday().String() { - next.Add(time.Duration(24-next.Hour()) * time.Hour) + next = next.Add(time.Duration(24-next.Hour()) * time.Hour) trying = true break }