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:
Cory Bloor
2018-02-05 16:14:00 -07:00
committed by Baldur Karlsson
parent 768e812e45
commit 9c7ec619ca
+1 -2
View File
@@ -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;
}
}