Skip to content

Commit

Permalink
call observer before setting initialDagBuilt to true
Browse files Browse the repository at this point in the history
  • Loading branch information
therealak12 committed Aug 25, 2023
1 parent e6864bd commit bd5c9e8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/contour/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,15 @@ func (e *EventHandler) Start(ctx context.Context) error {

e.WithField("last_update", time.Since(lastDAGRebuild)).WithField("outstanding", reset()).Info("performing delayed update")

// Rebuild the DAG
// Build a new DAG and sends it to the Observer.
latestDAG := e.builder.Build()
lastDAGRebuild = time.Now()
e.observer.OnChange(latestDAG)

// Allow XDS server to start (if it hasn't already).
e.initialDagBuilt = true

// Send update to the Observer and StatusUpdater
e.observer.OnChange(latestDAG)
// Update the status on objects.
for _, upd := range latestDAG.StatusCache.GetStatusUpdates() {
e.statusUpdater.Send(upd)
}
Expand Down

0 comments on commit bd5c9e8

Please sign in to comment.