mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 02:18:44 -07: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