mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-14 05:50:51 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -353,6 +353,8 @@ void RenderDoc::RemoteAccessServerThread(void *s)
|
||||
Threading::CloseThread(clientThread);
|
||||
clientThread = 0;
|
||||
|
||||
SAFE_DELETE(sock);
|
||||
|
||||
Threading::ReleaseModuleExitThread();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user