mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix that dnstap reconnects do not spam the log with the repeated
attempts. Attempts on the timer are only logged on high verbosity, if they produce a connection failure error.
This commit is contained in:
parent
e6ebabc0cc
commit
45712de9a2
2 changed files with 15 additions and 0 deletions
|
|
@ -1873,6 +1873,11 @@ static int dtio_open_output_local(struct dt_io_thread* dtio)
|
|||
if(connect(dtio->fd, (struct sockaddr*)&s, (socklen_t)sizeof(s))
|
||||
== -1) {
|
||||
char* to = dtio->socket_path;
|
||||
if(dtio->reconnect_timeout > DTIO_RECONNECT_TIMEOUT_MIN &&
|
||||
verbosity < 4) {
|
||||
dtio_close_fd(dtio);
|
||||
return 0; /* no log retries on low verbosity */
|
||||
}
|
||||
#ifndef USE_WINSOCK
|
||||
log_err("dnstap io: failed to connect to \"%s\": %s",
|
||||
to, strerror(errno));
|
||||
|
|
@ -1916,6 +1921,11 @@ static int dtio_open_output_tcp(struct dt_io_thread* dtio)
|
|||
if(connect(dtio->fd, (struct sockaddr*)&addr, addrlen) == -1) {
|
||||
if(errno == EINPROGRESS)
|
||||
return 1; /* wait until connect done*/
|
||||
if(dtio->reconnect_timeout > DTIO_RECONNECT_TIMEOUT_MIN &&
|
||||
verbosity < 4) {
|
||||
dtio_close_fd(dtio);
|
||||
return 0; /* no log retries on low verbosity */
|
||||
}
|
||||
#ifndef USE_WINSOCK
|
||||
if(tcp_connect_errno_needs_log(
|
||||
(struct sockaddr *)&addr, addrlen)) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
24 August 2020: Wouter
|
||||
- Fix that dnstap reconnects do not spam the log with the repeated
|
||||
attempts. Attempts on the timer are only logged on high verbosity,
|
||||
if they produce a connection failure error.
|
||||
|
||||
20 August 2020: Ralph
|
||||
- Fix stats double count issue (#289).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue