mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Add sleep to posix library startup to avoid race. Closes #857
* On win32 we can get the target control port instantly and immediately connect before program startup, on posix systems we must wait until afterwards and poll for open sockets. * This means there's a small window of opportunity where the program may have started running but we haven't connected yet to send any initial commands. Adding a sleep should give target control time to connect.
This commit is contained in:
@@ -69,6 +69,10 @@ void library_loaded()
|
||||
RDCLOG("Loading into %s", curfile.c_str());
|
||||
|
||||
LibraryHooks::RegisterHooks();
|
||||
|
||||
// we have a short sleep here to allow target control to connect, since unlike windows we can't
|
||||
// suspend the process during startup.
|
||||
Threading::Sleep(15);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user