From 3075445ed6c1160d2f033ac53aecd451f77666fc Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 22 Nov 2019 10:49:40 +1100 Subject: [PATCH] lock dispatch before reporting state --- lib/dns/dispatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index a3e28f3e12..4a77b7fe45 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -1334,12 +1334,12 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) { qid = disp->qid; + LOCK(&disp->lock); + dispatch_log(disp, LVL(90), "got TCP packet: requests %d, buffers %d, recvs %d", disp->requests, disp->tcpbuffers, disp->recv_pending); - LOCK(&disp->lock); - INSIST(disp->recv_pending != 0); disp->recv_pending = 0;