mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[interlink] do not nest retries for connect_to_af_unix(), it has already
Not sure why a retry loop using MAX_BIND_TRIES / BIND_TRIES_DELAY surrounds connect_to_af_unix(), since bind() is done elsewhere in the code, and connect_to_af_unix() already has its own retry loop inside the function, with its own set of defines for retries, i.e. MAX_CONNECT_TRIES / CONNECT_TRIES_DELAY, surrounding the connect(). No need to have two levels of retry; if it's not successful within connect_to_af_unix() it will never be.
This commit is contained in:
parent
86b621966e
commit
b482b9e069
@ -530,19 +530,10 @@ init_interlink(void)
|
||||
if (pid == -1) return -1;
|
||||
|
||||
if (pid > 0) {
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= (MAX_BIND_TRIES+2); ++i) {
|
||||
fd = connect_to_af_unix();
|
||||
|
||||
if (fd != -1) {
|
||||
master_pid = pid;
|
||||
return fd;
|
||||
}
|
||||
elinks_usleep(BIND_TRIES_DELAY * i);
|
||||
}
|
||||
return -1;
|
||||
master_pid = pid;
|
||||
return connect_to_af_unix();
|
||||
}
|
||||
|
||||
/* child */
|
||||
master_pid = getpid();
|
||||
close_terminal_pipes();
|
||||
|
Loading…
Reference in New Issue
Block a user