From 12b9b4990279d5c87cf9b01b4070e0c5b877009d Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 18 Nov 2016 10:27:49 -0500 Subject: [PATCH] fixed infinite loop bug --- UPnP.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UPnP.cpp b/UPnP.cpp index 612b1441..6a46ee77 100644 --- a/UPnP.cpp +++ b/UPnP.cpp @@ -66,10 +66,13 @@ namespace transport try { m_Service.run (); + // Discover failed + break; // terminate the thread } catch (std::exception& ex) { LogPrint (eLogError, "UPnP: runtime exception: ", ex.what ()); + PortMapping (); } } }