summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-10-05 21:19:25 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-10-05 21:19:25 +0200
commit73dd8a4f79ed2290d645f480ef0efade51aea403 (patch)
treec11e44fc71e78227baac31e6b71f75343b87902b
parent6b4dbbdd3728bcbd99228b4a9cce1db0b24ae95d (diff)
downloadpaccache-73dd8a4f79ed2290d645f480ef0efade51aea403.tar.gz
paccache-73dd8a4f79ed2290d645f480ef0efade51aea403.tar.zst
try to guess the fastest server for db files as well
-rw-r--r--pacredir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pacredir.c b/pacredir.c
index cc8ae03..fbb09bd 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -444,7 +444,8 @@ static int ahc_echo(void * cls,
if (request->http_code == MHD_HTTP_OK &&
/* for db files choose the most recent server */
- ((dbfile == 1 && request->last_modified > last_modified) ||
+ ((dbfile == 1 && request->last_modified >= last_modified &&
+ request->time_total < time_total) ||
/* for packages try to guess the fastest server */
(dbfile == 0 && request->time_total < time_total))) {
if (url != NULL)