diff options
| author | Cory Fields <[email protected]> | 2018-02-07 17:20:16 -0500 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2018-02-08 14:35:28 -0500 |
| commit | f26866b9caf9ff27d129c703f51b8c2922000243 (patch) | |
| tree | 85efd77129f0759c6649417f1f23c1a88354d492 /src/init.cpp | |
| parent | Merge #10498: Use static_cast instead of C-style casts for non-fundamental types (diff) | |
| download | discoin-f26866b9caf9ff27d129c703f51b8c2922000243.tar.xz discoin-f26866b9caf9ff27d129c703f51b8c2922000243.zip | |
boost: drop boost threads for upnp
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 50643ff96..2912beec6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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; |