]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debuginfod-client.c: Skip empty file creation for cancelled queries
authorAaron Merey <amerey@redhat.com>
Fri, 17 Mar 2023 15:20:50 +0000 (11:20 -0400)
committerAaron Merey <amerey@redhat.com>
Fri, 17 Mar 2023 15:20:50 +0000 (11:20 -0400)
commit5527216460c6131527c27b06dada015b67525966
tree105275459bd5e2d6722302d24b035c6c4970b07f
parenta7f65495258933eaf361e82eb325c9d826b455d5
debuginfod-client.c: Skip empty file creation for cancelled queries

Empty files in the client cache are used to indicate that contacted
servers could not find a requested resource.  Future queries for this
resource will not be attempted until the cache_miss_s duration has
passed.

Currently these empty files are also created when a query is cancelled
through the client's progressfn.  This can occur, for example, when a
user cancels a download with ctrl-c.

This prevents user-cancelled queries from being retried promptly without
having to modify cache_miss_s.  Fix this by skipping the creation of an
empty cache file when progressfn cancels a query.

Signed-off-by: Aaron Merey <amerey@redhat.com>
debuginfod/ChangeLog
debuginfod/debuginfod-client.c