mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Indent the new while loop.
This commit is contained in:
parent
dc7a7c6e1a
commit
17827a5edf
@ -378,28 +378,28 @@ bind_to_af_unix(void)
|
|||||||
if (af == -1) goto free_and_error;
|
if (af == -1) goto free_and_error;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
s_info_listen.fd = socket(af, SOCK_STREAM, 0);
|
s_info_listen.fd = socket(af, SOCK_STREAM, 0);
|
||||||
if (s_info_listen.fd == -1) {
|
if (s_info_listen.fd == -1) {
|
||||||
report_af_unix_error("socket()", errno);
|
report_af_unix_error("socket()", errno);
|
||||||
goto free_and_error;
|
|
||||||
}
|
|
||||||
|
|
||||||
setsock_reuse_addr(s_info_listen.fd);
|
|
||||||
|
|
||||||
if (bind(s_info_listen.fd, s_info_listen.addr, s_info_listen.size) < 0) {
|
|
||||||
if (errno != EADDRINUSE)
|
|
||||||
report_af_unix_error("bind()", errno);
|
|
||||||
|
|
||||||
if (++attempts <= MAX_BIND_TRIES) {
|
|
||||||
elinks_usleep(BIND_TRIES_DELAY * attempts);
|
|
||||||
close(s_info_listen.fd);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
goto free_and_error;
|
goto free_and_error;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
break;
|
setsock_reuse_addr(s_info_listen.fd);
|
||||||
}
|
|
||||||
|
if (bind(s_info_listen.fd, s_info_listen.addr, s_info_listen.size) < 0) {
|
||||||
|
if (errno != EADDRINUSE)
|
||||||
|
report_af_unix_error("bind()", errno);
|
||||||
|
|
||||||
|
if (++attempts <= MAX_BIND_TRIES) {
|
||||||
|
elinks_usleep(BIND_TRIES_DELAY * attempts);
|
||||||
|
close(s_info_listen.fd);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
goto free_and_error;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Listen and accept. */
|
/* Listen and accept. */
|
||||||
|
Loading…
Reference in New Issue
Block a user