aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-build-coordinator/client-communication.scm24
1 files changed, 13 insertions, 11 deletions
diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm
index 3f59dad..61b8731 100644
--- a/guix-build-coordinator/client-communication.scm
+++ b/guix-build-coordinator/client-communication.scm
@@ -703,17 +703,19 @@
(set-port-encoding! body "UTF-8")
(values
- (let ((parsed-body
- (if (equal? '(application/json-seq)
- (response-content-type response))
- (json-seq->scm
- body
- ;; TODO I would like to use 'throw, but it always raises an
- ;; exception, so this needs fixing upstream first
- #:handle-truncate 'replace)
- (json->scm body))))
- (close-port body)
- parsed-body)
+ (if (equal? '(application/json-seq)
+ (response-content-type response))
+ ;; TODO There's no mechanism to close the port after the
+ ;; stream/sequence has finished
+ (json-seq->scm
+ body
+ ;; TODO I would like to use 'throw, but it always raises an
+ ;; exception, so this needs fixing upstream first
+ #:handle-truncate 'replace)
+ (let ((parsed-body
+ (json->scm body)))
+ (close-port body)
+ parsed-body))
response))))))
(define* (send-submit-build-request