|
Lines 2892-2901
Link Here
|
| 2892 |
#endif |
2892 |
#endif |
| 2893 |
channel_set_reuseaddr(sock); |
2893 |
channel_set_reuseaddr(sock); |
| 2894 |
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { |
2894 |
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { |
|
|
2895 |
int save_errno = errno; |
| 2895 |
debug2("bind port %d: %.100s", port, strerror(errno)); |
2896 |
debug2("bind port %d: %.100s", port, strerror(errno)); |
| 2896 |
close(sock); |
2897 |
close(sock); |
| 2897 |
|
2898 |
|
| 2898 |
if (ai->ai_next) |
2899 |
if (ai->ai_next || save_errno == EADDRNOTAVAIL) |
| 2899 |
continue; |
2900 |
continue; |
| 2900 |
|
2901 |
|
| 2901 |
for (n = 0; n < num_socks; n++) { |
2902 |
for (n = 0; n < num_socks; n++) { |