boost: drop boost threads for upnp

This commit is contained in:
Cory Fields
2018-02-07 17:20:16 -05:00
parent 0277173b1d
commit f26866b9ca
4 changed files with 61 additions and 43 deletions

View File

@@ -165,6 +165,7 @@ void Interrupt()
InterruptRPC();
InterruptREST();
InterruptTorControl();
InterruptMapPort();
if (g_connman)
g_connman->Interrupt();
}
@@ -191,7 +192,7 @@ void Shutdown()
#ifdef ENABLE_WALLET
FlushWallets();
#endif
MapPort(false);
StopMapPort();
// Because these depend on each-other, we make sure that neither can be
// using the other before destroying them.
@@ -1669,7 +1670,9 @@ bool AppInitMain()
Discover(threadGroup);
// Map ports with UPnP
MapPort(gArgs.GetBoolArg("-upnp", DEFAULT_UPNP));
if (gArgs.GetBoolArg("-upnp", DEFAULT_UPNP)) {
StartMapPort();
}
CConnman::Options connOptions;
connOptions.nLocalServices = nLocalServices;