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 (); } } }