Problem: resubscribe_at can be nil
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Solution: allow nil values in resubscribe_at
This commit is contained in:
parent
8ba1b213d6
commit
c47a7f7f2a
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user