From: W.C.A. Wijngaards Date: Mon, 19 Oct 2020 11:36:53 +0000 (+0200) Subject: Fixup for clear of tcp handler structure. X-Git-Tag: release-1.13.0rc1~31^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=531ce9e85c4d715c0e5f801fcaf0c56c71602b8a;p=thirdparty%2Funbound.git Fixup for clear of tcp handler structure. --- diff --git a/util/netevent.c b/util/netevent.c index 1e501b9ab..2428417fa 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -965,7 +965,10 @@ comm_point_tcp_accept_callback(int fd, short event, void* arg) /* clear leftover flags from previous use, and then set the * correct event base for the event structure for libevent */ ub_event_free(c_hdl->ev->ev); - c_hdl->tcp_do_toggle_rw = 1; + if((c_hdl->type == comm_tcp && c_hdl->tcp_req_info) || + c_hdl->type == comm_local || c_hdl->type == comm_raw) + c_hdl->tcp_do_toggle_rw = 0; + else c_hdl->tcp_do_toggle_rw = 1; if(c_hdl->type == comm_http) { #ifdef HAVE_NGHTTP2