mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Speed up linux process connection
There's no need to wait for exponential backoff to satisfy waitTime > MAX_WAIT_TIME if we already found the result.
This commit is contained in:
committed by
Baldur Karlsson
parent
768e812e45
commit
9c7ec619ca
@@ -44,7 +44,7 @@ int GetIdentPort(pid_t childPid)
|
||||
int waitTime = INITIAL_WAIT_TIME;
|
||||
|
||||
// try for a little while for the /proc entry to appear
|
||||
while(waitTime <= MAX_WAIT_TIME)
|
||||
while(ret == 0 && waitTime <= MAX_WAIT_TIME)
|
||||
{
|
||||
// back-off for each retry
|
||||
usleep(waitTime);
|
||||
@@ -75,7 +75,6 @@ int GetIdentPort(pid_t childPid)
|
||||
hexport <= RenderDoc_LastTargetControlPort)
|
||||
{
|
||||
ret = hexport;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user