Make sure the send thread terminates before delete

This commit is contained in:
Clement 2019-07-22 17:03:07 -07:00
parent d62dde1ab8
commit 8dd18fbe62

View file

@ -1292,6 +1292,7 @@ void OctreeServer::aboutToFinish() {
for (auto& it : _sendThreads) { for (auto& it : _sendThreads) {
auto& sendThread = *it.second; auto& sendThread = *it.second;
sendThread.setIsShuttingDown(); sendThread.setIsShuttingDown();
sendThread.terminate();
} }
// Clear will destruct all the unique_ptr to OctreeSendThreads which will call the GenericThread's dtor // Clear will destruct all the unique_ptr to OctreeSendThreads which will call the GenericThread's dtor