diff options
author | Christopher Baines <mail@cbaines.net> | 2021-02-13 11:06:37 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-02-22 19:53:46 +0000 |
commit | c1e896e979663ac37441318b22a13e0a7669ad5b (patch) | |
tree | b12a841b5124d708f3a33ee6abf6805469922e10 /CODE-OF-CONDUCT | |
parent | 8f2d69ccb2f95fa0caa78f0bbf4cfe3777f4357a (diff) | |
download | guix-prepare-to-move-guix-scripts-substitute-code.tar guix-prepare-to-move-guix-scripts-substitute-code.tar.gz |
substitute: Rework connection error handling.prepare-to-move-guix-scripts-substitute-code
This is part of trying to reduce the interdependency of code within the
substitute module.
This commit addresses some of the error handling that was performed through
open-connection-for-uri/maybe. The new approach is to use
call-with-connection-error-handling, and wrap calls to http-multiple-get and
http-fetch with that procedure, which takes care of handling connection
errors.
I think this is even slightly more rigerous than the previous setup, because
this approach handles connection errors that occur when http-multiple-get
reconnects to a host.
* guix/scripts/substitute.scm (open-connection-for-uri/maybe): Transform in to
call-with-connection-error-handling.
(fetch-narinfos): Use call-with-connection-error-handling.
(process-query): Replace open-connection-for-uri/maybe with
open-connection-for-uri/cached.
(open-connection-for-uri/cached): Set a default timeout, matching the
behaviour in open-connection-for-uri/maybe.
(process-substitution): Use call-with-connection-error-handling.
Diffstat (limited to 'CODE-OF-CONDUCT')
0 files changed, 0 insertions, 0 deletions