From: W.C.A. Wijngaards Date: Thu, 23 Jan 2020 14:39:27 +0000 (+0100) Subject: dnstap io, failure to add event closes and attempts to reopen the output. X-Git-Tag: 1.11.0rc1~120^2~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1042134eec0a1ddaca364c7794b467223934f197;p=thirdparty%2Funbound.git dnstap io, failure to add event closes and attempts to reopen the output. --- diff --git a/dnstap/dtstream.c b/dnstap/dtstream.c index 60cb04567..aa590ee8f 100644 --- a/dnstap/dtstream.c +++ b/dnstap/dtstream.c @@ -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;