Skip to content

Commit

Permalink
catalog/from-k8s: Don't spin loop on watchService
Browse files Browse the repository at this point in the history
With the `default:` clause here, the time.After doesn't work and just
falls through to `default` causing a spin loop on the consul agent.
  • Loading branch information
mattrobenolt committed Nov 21, 2018
1 parent 90af0ee commit 8cdd856
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion catalog/from-k8s/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ func (s *ConsulSyncer) watchService(ctx context.Context, name string) {

// Wait for our poll period
case <-time.After(s.SyncPeriod):
default:
}

// Wait for service changes
Expand Down

0 comments on commit 8cdd856

Please sign in to comment.