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));
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)) {
+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).