Treat address bind errors as non-fatal

This commit is contained in:
Miroslav Lichvar 2013-07-17 13:45:36 +02:00
parent 25aa9f5b42
commit f6a39d75a7
2 changed files with 6 additions and 2 deletions

View file

@ -248,8 +248,10 @@ prepare_socket(int family)
}
if (bind(sock_fd, &my_addr.u, my_addr_len) < 0) {
LOG_FATAL(LOGF_CmdMon, "Could not bind %s command socket : %s",
LOG(LOGS_ERR, LOGF_CmdMon, "Could not bind %s command socket : %s",
family == AF_INET ? "IPv4" : "IPv6", strerror(errno));
close(sock_fd);
return -1;
}
/* Register handler for read events on the socket */

View file

@ -210,8 +210,10 @@ prepare_socket(int family)
#endif
if (bind(sock_fd, &my_addr.u, my_addr_len) < 0) {
LOG_FATAL(LOGF_NtpIO, "Could not bind %s NTP socket : %s",
LOG(LOGS_ERR, LOGF_NtpIO, "Could not bind %s NTP socket : %s",
family == AF_INET ? "IPv4" : "IPv6", strerror(errno));
close(sock_fd);
return -1;
}
/* Register handler for read events on the socket */