]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
dnstap io, failure to add event closes and attempts to reopen the output.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 23 Jan 2020 14:39:27 +0000 (15:39 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 23 Jan 2020 14:39:27 +0000 (15:39 +0100)
dnstap/dtstream.c

index 60cb04567e431deab0b83e4531d1bbf7f577426c..aa590ee8f02c3014980a0d13e55cfe66411af44d 100644 (file)
@@ -757,6 +757,8 @@ static void dtio_add_output_event_read(struct dt_io_thread* dtio)
                log_err("dnstap io: out of memory (adding event)");
                dtio->event_added = 0;
                dtio->event_added_is_write = 0;
+               /* close output and start reattempts to open it */
+               dtio_close_output(dtio);
                return;
        }
        dtio->event_added = 1;
@@ -778,6 +780,8 @@ static void dtio_add_output_event_write(struct dt_io_thread* dtio)
                log_err("dnstap io: out of memory (adding event)");
                dtio->event_added = 0;
                dtio->event_added_is_write = 0;
+               /* close output and start reattempts to open it */
+               dtio_close_output(dtio);
                return;
        }
        dtio->event_added = 1;