aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging/http.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 531df57..21b64d1 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -38,6 +38,9 @@
#:use-module (web response)
#:use-module (web uri)
#:use-module (lzlib)
+ #:use-module ((gnutls) #:select (gnutls-version))
+ #:use-module ((guix config) #:select (%guix-version))
+ #:use-module ((guix utils) #:select (version>=?))
#:use-module (prometheus)
#:use-module (guix store)
#:use-module (guix base64)
@@ -65,6 +68,22 @@
(define (make-http-agent-interface coordinator-uri
agent-uuid
password)
+ (let* ((gnutls-ver (gnutls-version))
+ (guix-ver %guix-version)
+ (gnutls-probably-retries-on-gc?
+ (or (version>=? gnutls-ver "3.7.3")
+ ;; guix patched gnutls to retry when interrupted by gc before
+ ;; gnutls released the change
+ (version>=? guix-ver "1.3.0-14"))))
+ (simple-format (current-error-port)
+ "gc protection ~A (gnutls version: ~A, guix version: ~A)\n"
+ (if gnutls-probably-retries-on-gc?
+ "disabled"
+ "enabled")
+ gnutls-ver
+ guix-ver)
+ (use-gc-protection? (not gnutls-probably-retries-on-gc?)))
+
(make <http-agent-interface>
#:coordinator-uri coordinator-uri
#:agent-uuid agent-uuid