From c3a2e6795dc32ffa51a25e1c71bdfe23f92db1cd Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 20 Nov 2023 11:25:19 +0000 Subject: Use port timeouts when checking substitutes As I think this is better than the alarm syscall. --- guix-build-coordinator/agent.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index c6f2122..599a70a 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -712,12 +712,12 @@ unable to query substitute servers without caching")) (if (list? non-derivation-substitute-urls) (retry-on-error (lambda () - (with-timeout 60 ; seconds - (raise-exception - (make-exception-with-message "timeout checking for substitutes (no cache)")) - (has-substiutes-no-cache? - non-derivation-substitute-urls - file))) + (with-port-timeouts + (lambda () + (has-substiutes-no-cache? + non-derivation-substitute-urls + file)) + #:timeout (* 60 1000))) #:times 20 #:delay (random 15)) #f))) -- cgit v1.2.3