Exit when no UPnP router found and fUseUPnP gets set to 0.
authorMatt Corallo <matt@bluematt.me>
Thu, 14 Apr 2011 22:37:50 +0000 (00:37 +0200)
committerMatt Corallo <matt@bluematt.me>
Thu, 14 Apr 2011 22:37:50 +0000 (00:37 +0200)
net.cpp

diff --git a/net.cpp b/net.cpp
index 833aafc..f3857ba 100644 (file)
--- a/net.cpp
+++ b/net.cpp
@@ -939,7 +939,7 @@ void ThreadMapPort2(void* parg)
         freeUPNPDevlist(devlist); devlist = 0;
         FreeUPNPUrls(&urls);
         loop {
-            if (fShutdown)
+            if (fShutdown || !fUseUPnP)
                 return;
             Sleep(2000);
         }