From 4183044e960889423c8cb73b7129ec4ed9ae36bd Mon Sep 17 00:00:00 2001 From: Caleb Callaway Date: Wed, 22 Oct 2014 18:44:13 -0700 Subject: [PATCH] Fix UPnP log spam on networks without UPnP IGDs (see #893) We should only run the UPnP port mapping renewal routine if the initial discovery and configuration succeed. This commit applies that logic. --- cmd/syncthing/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index fcb042a9..92158728 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -712,11 +712,11 @@ func setupUPnP() { l.Warnln("Failed to create UPnP port mapping") } else { l.Infof("Created UPnP port mapping for external port %d on UPnP device %s.", externalPort, igd.FriendlyIdentifier()) - } - } - if opts.UPnPRenewal > 0 { - go renewUPnP(port) + if opts.UPnPRenewal > 0 { + go renewUPnP(port) + } + } } } } else {