mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
lib/upnp: Use simple continue in loop (#6192)
This commit is contained in:
parent
509d123251
commit
a04f54a16a
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user