diff options
author | Daniel Kahn Gillmor <[email protected]> | 2016-10-29 06:00:50 +0000 |
---|---|---|
committer | Daniel Kahn Gillmor <[email protected]> | 2019-07-20 18:16:19 +0000 |
commit | 4e63d9c07c43b08a00c87013120ca0d53176746b (patch) | |
tree | 720534c6a1154f6fd43664cc903e5edf56b3ffac /dirmngr/dirmngr.c | |
parent | dirmngr: hkp: Avoid potential race condition when some hosts die. (diff) | |
download | gnupg-4e63d9c07c43b08a00c87013120ca0d53176746b.tar.gz gnupg-4e63d9c07c43b08a00c87013120ca0d53176746b.zip |
dirmngr: Avoid need for hkp housekeeping.
* dirmngr/ks-engine-hkp.c (host_is_alive): New function. Test whether
host is alive and resurrects it if it has been dead long enough.
(select_random_host, map_host, ks_hkp_mark_host): Use host_is_alive
instead of testing hostinfo_t->dead directly.
(ks_hkp_housekeeping): Remove function, no longer needed.
* dirmngr/dirmngr.c (housekeeping_thread): Remove call to
ks_hkp_housekeeping.
--
Rather than resurrecting hosts upon scheduled resurrection times, test
whether hosts should be resurrected as they're inspected for being
dead. This removes the need for explicit housekeeping, and makes host
resurrections happen "just in time", rather than being clustered on
HOUSEKEEPING_INTERVAL seconds.
Signed-off-by: Daniel Kahn Gillmor <[email protected]>
Gbp-Pq: Topic dirmngr-idling
Gbp-Pq: Name dirmngr-Avoid-need-for-hkp-housekeeping.patch
Diffstat (limited to '')
-rw-r--r-- | dirmngr/dirmngr.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 667308cc7..4f7f4be32 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -1938,12 +1938,10 @@ static void * housekeeping_thread (void *arg) { static int sentinel; - time_t curtime; struct server_control_s ctrlbuf; (void)arg; - curtime = gnupg_get_time (); if (sentinel) { log_info ("housekeeping is already going on\n"); @@ -1956,7 +1954,6 @@ housekeeping_thread (void *arg) memset (&ctrlbuf, 0, sizeof ctrlbuf); dirmngr_init_default_ctrl (&ctrlbuf); - ks_hkp_housekeeping (curtime); if (network_activity_seen) { network_activity_seen = 0; |