From c47a7f7f2a503bdf2bd5618309cba61094c16d44 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Sat, 20 Nov 2021 22:07:38 +0100 Subject: [PATCH] Problem: resubscribe_at can be nil Solution: allow nil values in resubscribe_at --- cmd/eksterd/hubbackend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/eksterd/hubbackend.go b/cmd/eksterd/hubbackend.go index feeda75..d1a51fd 100644 --- a/cmd/eksterd/hubbackend.go +++ b/cmd/eksterd/hubbackend.go @@ -42,7 +42,7 @@ type Feed struct { Hub string Secret string LeaseSeconds int64 - ResubscribeAt time.Time + ResubscribeAt *time.Time } var ( @@ -223,7 +223,7 @@ func (h *hubIncomingBackend) run() error { for _, feed := range feeds { log.Printf("Looking at %s\n", feed.URL) - if time.Now().After(feed.ResubscribeAt) { + if feed.ResubscribeAt != nil && time.Now().After(*feed.ResubscribeAt) { if feed.Callback == "" { feed.Callback = fmt.Sprintf("%s/incoming/%d", h.baseURL, feed.ID) }