lib/upnp: Use simple continue in loop (#6192)

This commit is contained in:
Aman Gupta 2019-11-26 14:55:34 -08:00 committed by Audrius Butkevicius
parent 509d123251
commit a04f54a16a

View File

@ -119,11 +119,10 @@ func Discover(ctx context.Context, renewal, timeout time.Duration) []nat.Device
}() }()
seenResults := make(map[string]bool) seenResults := make(map[string]bool)
nextResult:
for result := range resultChan { for result := range resultChan {
if seenResults[result.ID()] { if seenResults[result.ID()] {
l.Debugf("Skipping duplicate result %s", result.ID()) l.Debugf("Skipping duplicate result %s", result.ID())
continue nextResult continue
} }
results = append(results, result) results = append(results, result)