mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 22:35:06 -05:00
ntp: don't log error when socket() fails for client only socket
This commit is contained in:
9
ntp_io.c
9
ntp_io.c
@@ -97,8 +97,13 @@ prepare_socket(int family, int port_number, int client_only)
|
|||||||
sock_fd = socket(family, SOCK_DGRAM, 0);
|
sock_fd = socket(family, SOCK_DGRAM, 0);
|
||||||
|
|
||||||
if (sock_fd < 0) {
|
if (sock_fd < 0) {
|
||||||
LOG(LOGS_ERR, LOGF_NtpIO, "Could not open %s NTP socket : %s",
|
if (!client_only) {
|
||||||
family == AF_INET ? "IPv4" : "IPv6", strerror(errno));
|
LOG(LOGS_ERR, LOGF_NtpIO, "Could not open %s NTP socket : %s",
|
||||||
|
family == AF_INET ? "IPv4" : "IPv6", strerror(errno));
|
||||||
|
} else {
|
||||||
|
DEBUG_LOG(LOGF_NtpIO, "Could not open %s NTP socket : %s",
|
||||||
|
family == AF_INET ? "IPv4" : "IPv6", strerror(errno));
|
||||||
|
}
|
||||||
return INVALID_SOCK_FD;
|
return INVALID_SOCK_FD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user