diff --git a/bgs/fedmgr.go b/bgs/fedmgr.go index be311985f..c5c5f500c 100644 --- a/bgs/fedmgr.go +++ b/bgs/fedmgr.go @@ -413,9 +413,9 @@ func (s *Slurper) subscribeWithRedialer(ctx context.Context, host *models.PDS, s continue } - backoff = 0 // reset backoff on successful connection log.Info("event subscription response code: ", res.StatusCode) + curCursor := cursor if err := s.handleConnection(ctx, host, con, &cursor, sub); err != nil { if errors.Is(err, ErrTimeoutShutdown) { log.Infof("shutting down pds subscription to %s, no activity after %s", host.Host, EventsTimeout) @@ -423,6 +423,10 @@ func (s *Slurper) subscribeWithRedialer(ctx context.Context, host *models.PDS, s } log.Warnf("connection to %q failed: %s", host.Host, err) } + + if cursor > curCursor { + backoff = 0 + } } }