guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ludovic Courtès
Date: Tue, 26 Sep 2023 06:26:29 -0400 (EDT)

branch: master
commit 7688e9888edc84e5955e4b44f2274fb258cbc792
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Sep 25 09:56:32 2023 +0200

    remote: ‘send-log’ ignores ‘close-port’ exceptions.
    
    Previously, ‘close-port’ could throw, leading the calling fiber to
    terminate prematurely.
    
    * src/cuirass/remote.scm (send-log): Ignore errors when closing
    COMPRESSED from the ‘catch’ handler.
---
 src/cuirass/remote.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/cuirass/remote.scm b/src/cuirass/remote.scm
index 6d5952f..a691510 100644
--- a/src/cuirass/remote.scm
+++ b/src/cuirass/remote.scm
@@ -351,7 +351,9 @@ PRIVATE-KEY to sign narinfos."
                (dump-port log compressed)
                (close-port compressed))
              (lambda (key . args)
-               (close-port compressed)
+               ;; Closing COMPRESSED flushes it so it might throw to
+               ;; 'zlib-error'.  Ignore it.
+               (false-if-exception (close-port compressed))
                (unless (eq? key 'zlib-error)
                  (apply throw args)))))
          (close-port sock)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]