From c3daf58b898cd97ffe8b3006705e8494badb5b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 3 Jan 2020 15:44:54 +0100 Subject: [PATCH] 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 3d144df41..67d926f8a 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))))