Skip to content

Commit c9d7c75

Browse files
cgmbbaldurk
authored andcommitted
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.
1 parent 25713c7 commit c9d7c75

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

renderdoc/os/posix/linux/linux_process.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int GetIdentPort(pid_t childPid)
4444
int waitTime = INITIAL_WAIT_TIME;
4545

4646
// try for a little while for the /proc entry to appear
47-
while(waitTime <= MAX_WAIT_TIME)
47+
while(ret == 0 && waitTime <= MAX_WAIT_TIME)
4848
{
4949
// back-off for each retry
5050
usleep(waitTime);
@@ -75,7 +75,6 @@ int GetIdentPort(pid_t childPid)
7575
hexport <= RenderDoc_LastTargetControlPort)
7676
{
7777
ret = hexport;
78-
break;
7978
}
8079
}
8180

0 commit comments

Comments
 (0)