Wait for the socket thread to finish when unloading, close the open socket.

The Android loader dlopens a layer twice, so if the layer did not clean up
properly the first time it is unloaded then we will fail to open a socket
on the default port 38920 during the second dlopen.
This commit is contained in:
Michael Rennie
2016-08-18 16:27:04 +01:00
committed by baldurk
parent 333d8e16b1
commit cc3cc1f392
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -320,6 +320,7 @@ RenderDoc::~RenderDoc()
{
m_RemoteServerThreadShutdown = true;
// don't join, just close the thread, as we can't wait while in the middle of module unloading
Threading::Sleep(50);
Threading::CloseThread(m_RemoteThread);
m_RemoteThread = 0;
}
+2
View File
@@ -353,6 +353,8 @@ void RenderDoc::RemoteAccessServerThread(void *s)
Threading::CloseThread(clientThread);
clientThread = 0;
SAFE_DELETE(sock);
Threading::ReleaseModuleExitThread();
}