]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Slightly smaller critical region in one case in infra cache.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 10 Feb 2012 09:21:06 +0000 (09:21 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 10 Feb 2012 09:21:06 +0000 (09:21 +0000)
git-svn-id: file:///svn/unbound/trunk@2611 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/cache/infra.c

index 8321fb6931e9ceb83fcb72bbd1eedbd80a397eec..812612dc49fb6bcc04b1cef3d75de672eae76da8 100644 (file)
@@ -1,3 +1,6 @@
+10 February 2012: Wouter
+       - Slightly smaller critical region in one case in infra cache.
+
 9 February 2012: Wouter
        - Fix AHX_BROKEN_MEMCMP for autoheader mess up of #undef in config.h.
 
index 8a83528b5f78a01b237ac9573e04e42e1b1ad3ea..e6772baed3e8876108963479fd09848eed8d6e33 100644 (file)
@@ -465,11 +465,11 @@ infra_get_lame_rtt(struct infra_cache* infra,
                /* minus 1000 because that is outside of the RTTBAND, so
                 * blacklisted servers stay blacklisted if this is chosen */
                if(host->rtt.rto >= USEFUL_SERVER_TOP_TIMEOUT) {
+                       lock_rw_unlock(&e->lock);
                        *rtt = USEFUL_SERVER_TOP_TIMEOUT-1000;
                        *lame = 0;
                        *dnsseclame = 0;
                        *reclame = 0;
-                       lock_rw_unlock(&e->lock);
                        return 1;
                }
                lock_rw_unlock(&e->lock);