From a04f54a16ace4884bc4fdeea959b67a32f27eb1b Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Tue, 26 Nov 2019 14:55:34 -0800 Subject: [PATCH] lib/upnp: Use simple continue in loop (#6192) --- lib/upnp/upnp.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/upnp/upnp.go b/lib/upnp/upnp.go index 34e1b4d37..85854102c 100644 --- a/lib/upnp/upnp.go +++ b/lib/upnp/upnp.go @@ -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)