guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 05/06: web: Update comment regarding the 'tls-wrap' port


From: Ludovic Courtès
Subject: [Guile-commits] 05/06: web: Update comment regarding the 'tls-wrap' port wrapper.
Date: Mon, 13 Jan 2020 05:54:37 -0500 (EST)

civodul pushed a commit to branch master
in repository guile.

commit c3daf58b898cd97ffe8b3006705e8494badb5b42
Author: Ludovic Courtès <address@hidden>
AuthorDate: Fri Jan 3 15:44:54 2020 +0100

    web: Update comment regarding the 'tls-wrap' port wrapper.
    
    * module/web/client.scm (tls-wrap): Update comment.
---
 module/web/client.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/module/web/client.scm b/module/web/client.scm
index 3d144df..67d926f 100644
--- a/module/web/client.scm
+++ b/module/web/client.scm
@@ -264,7 +264,15 @@ host name without trailing dot."
           (close-port port))
         (unless (port-closed? record)
           (close-port record)))
+
       (setvbuf record 'block)
+
+      ;; Return a port that wraps RECORD to ensure that closing it also
+      ;; closes PORT, the actual socket port, and its file descriptor.
+      ;; XXX: This wrapper would be unnecessary if GnuTLS could
+      ;; automatically close SESSION's file descriptor when RECORD is
+      ;; closed, but that doesn't seem to be possible currently (as of
+      ;; 3.6.9).
       (make-custom-binary-input/output-port "gnutls wrapped port" read! write!
                                             get-position set-position!
                                             close))))



reply via email to

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