aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm7
-rw-r--r--guix-build-coordinator/utils.scm46
2 files changed, 15 insertions, 38 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 974d477..8e01cb9 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -83,8 +83,7 @@
"disabled"
"enabled")
gnutls-ver
- guix-ver)
- (use-gc-protection? (not gnutls-probably-retries-on-gc?)))
+ guix-ver))
(make <http-agent-interface>
#:coordinator-uri coordinator-uri
@@ -203,9 +202,7 @@
response))))))
(retry-on-error (lambda ()
- (with-port-timeouts
- (lambda ()
- (with-gc-protection make-request))))
+ (with-port-timeouts make-request))
#:times 9
#:delay 10
#:ignore agent-error-from-coordinator?))
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index 0aaba2e..e16b41a 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -49,9 +49,6 @@
make-base64-output-port
- use-gc-protection?
- with-gc-protection
-
with-port-timeouts
set-store-connection-timeout
@@ -300,17 +297,6 @@ upcoming chunk."
(parse-query-string query))
'())))
-(define use-gc-protection?
- (make-parameter #t))
-
-(define (with-gc-protection thunk)
- (if (use-gc-protection?)
- (dynamic-wind
- gc-disable
- thunk
- gc-enable)
- (thunk)))
-
(define &port-timeout
(make-exception-type '&port-timeout
&external-error
@@ -355,12 +341,10 @@ upcoming chunk."
(unless (string-null? s)
(let* ((bv (string->bytevector s "ISO-8859-1"))
(length (bytevector-length bv)))
- (with-gc-protection
- (lambda ()
- (put-string port (number->string length 16))
- (put-string port "\r\n")
- (put-bytevector port bv)
- (put-string port "\r\n")))
+ (put-string port (number->string length 16))
+ (put-string port "\r\n")
+ (put-bytevector port bv)
+ (put-string port "\r\n")
(when report-bytes-sent
(report-bytes-sent length))
@@ -380,12 +364,10 @@ upcoming chunk."
(define (flush) #t)
(define (close)
- (with-gc-protection
- (lambda ()
- (put-string port "0\r\n\r\n")
- (force-output port)
- (unless keep-alive?
- (close-port port)))))
+ (put-string port "0\r\n\r\n")
+ (force-output port)
+ (unless keep-alive?
+ (close-port port)))
(let ((ret (make-soft-port
(vector %put-char %put-string flush #f close) "w")))
(setvbuf ret 'block buffering)
@@ -429,13 +411,11 @@ upcoming chunk."
(callback chunked-output-port)
(close-port chunked-output-port)
- (with-gc-protection
- (lambda ()
- (let ((response (read-response port)))
- (let ((body (read-response-body response)))
- (close-port port)
- (values response
- body)))))))))))))
+ (let ((response (read-response port)))
+ (let ((body (read-response-body response)))
+ (close-port port)
+ (values response
+ body)))))))))))
(define (find-missing-substitutes-for-output store substitute-urls output)
(if (valid-path? store output)