mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +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)
|
||||
nextResult:
|
||||
for result := range resultChan {
|
||||
if seenResults[result.ID()] {
|
||||
l.Debugf("Skipping duplicate result %s", result.ID())
|
||||
continue nextResult
|
||||
continue
|
||||
}
|
||||
|
||||
results = append(results, result)
|
||||
|
Loading…
Reference in New Issue
Block a user