Fix e83f24e3a6
and 1ff20e8f6a
miniupnpc leak and crash on thread exit.
std::thread crashes when destroyed without being joined or detached. Joining would wait on the UPnP thread, which can take upwards of 10 seconds, so detach instead. Reviewed By: elexis Differential Revision: https://code.wildfiregames.com/D2181 This was SVN commit r22674.
This commit is contained in:
parent
c2e9e2263a
commit
8a4d2a8ccc
@ -159,6 +159,11 @@ CNetServerWorker::~CNetServerWorker()
|
||||
m_WorkerThread.join();
|
||||
}
|
||||
|
||||
#if CONFIG2_MINIUPNPC
|
||||
if (m_UPnPThread.joinable())
|
||||
m_UPnPThread.detach();
|
||||
#endif
|
||||
|
||||
// Clean up resources
|
||||
|
||||
delete m_Stats;
|
||||
|
Loading…
Reference in New Issue
Block a user