discovery: Cleanup ticker

This commit is contained in:
Frederic Branczyk 2018-01-29 13:51:04 +01:00
parent fe926e7829
commit 73e829137b
No known key found for this signature in database
GPG Key ID: 7741A52782A90069
1 changed files with 2 additions and 0 deletions

View File

@ -152,6 +152,8 @@ func (m *Manager) runProvider(ctx context.Context, poolKey poolKey, updates chan
func (m *Manager) runUpdater(ctx context.Context) { func (m *Manager) runUpdater(ctx context.Context) {
ticker := time.NewTicker(5 * time.Second) ticker := time.NewTicker(5 * time.Second)
defer ticker.Stop()
for { for {
select { select {
case <-ctx.Done(): case <-ctx.Done():