]> git.ipfire.org Git - thirdparty/bind9.git/commit
Simplify when to detach the client
authorMatthijs Mekking <matthijs@isc.org>
Thu, 25 Mar 2021 17:12:38 +0000 (18:12 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 2 Apr 2021 07:14:09 +0000 (09:14 +0200)
commit48b0dc159b9519f8c2ee1d2d529dad40cf2947eb
tree369f227d0342be8375dfde23fe4cbf1711680664
parent92f7a67892510c4670a736400da0a0a315534ca6
Simplify when to detach the client

With stale-answer-client-timeout, we may send a response to the client,
but we may want to hold on to the network manager handle, because
recursion is going on in the background, or we need to refresh a
stale RRset.

Simplify the setting of 'nodetach':
* During a staleonly lookup we should not detach the nmhandle, so just
  set it prior to 'query_lookup()'.
* During a staleonly "stalefirst" lookup set the 'nodetach' to true
  if we are going to refresh the RRset.

Now there is no longer the need to clear the 'nodetach' if we go
through the "dbfind_stale", "stale_refresh_window", or "stale_only"
paths.
lib/ns/query.c