From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:52404) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jB7eP-0002x7-D9 for guix-patches@gnu.org; Sun, 08 Mar 2020 21:56:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jB7eO-00071J-9H for guix-patches@gnu.org; Sun, 08 Mar 2020 21:56:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jB7eO-000716-5T for guix-patches@gnu.org; Sun, 08 Mar 2020 21:56:12 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jB5oz-0001Hj-Nz for guix-patches@gnu.org; Sun, 08 Mar 2020 19:59:01 -0400 Subject: [bug#39873] [PATCH 3/3] substitute: Close port at the end of http-multiple-get. Resent-Message-ID: References: <87imjmeagu.fsf@cbaines.net> <20200302210735.13337-1-mail@cbaines.net> <20200302210735.13337-3-mail@cbaines.net> <87wo7veulg.fsf@gnu.org> From: Christopher Baines In-reply-to: <87wo7veulg.fsf@gnu.org> Date: Sun, 08 Mar 2020 23:58:51 +0000 Message-ID: <877dzue6v8.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 39873@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines scribes: > >> * guix/scripts/substitute.scm (http-multiple-get): Add close-port call. >> --- >> guix/scripts/substitute.scm | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm >> index a88cb5bcfe..e3f5837a8e 100755 >> --- a/guix/scripts/substitute.scm >> +++ b/guix/scripts/substitute.scm >> @@ -544,6 +544,7 @@ initial connection on which HTTP requests are sent." >> (() >> (match (drop requests processed) >> (() >> + (close-port p) > > LGTM! > > Did you notice a file descriptor leak somewhere? No, I was looking in to some wierd TLS related errors I had when using http-multiple-get to query Curiass from the Guix Data Service, and I noticed that maybe the port wasn't being closed when it should be. I still haven't done a lot of testing, but I think some of these changes have helped (although probably not this one). --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl5lhrtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XemRA//XN+hsKKOfddNAzOdb8xe6VzkqEIVjhgensZmBQuskx+iXqyMzXGy9YFG Q+PdhmXQZQzREgy/w8Ua0c8APMRzbulKpBloXnxGt+vnu3HPuDEcdvcTynmt1YHB yGXesfb0izj9JTbg9pyQDx4tukvSlrnat/NWy+C5EtS6HXc0BZeCBz/jMpoj7rv/ z47YxnrJ0MGt2KR0hEkyd53w7QBJUDrS7KuqCii3rfkJg6uKAs+5OAw98ZYC0Emb uri/nb1y8EnQaVzJHrKS5nHlh11szj3dMJ06JN/lLynUcX0EQzlmd9tdVRPMP4nN D/Lo3p8Vmc/etL1CE8M/EfYPSPa8jxe1KvWzLovpny2Z1l0NQZumgEprr6M+XH6L k9Holo3EegcdMun9aggaXTqA8SAKSaR+Nls/sjb1nPV6iZV4MQKsQ7P1Co7h/OZt s5qmwrzotdAO6GuVDTL6wLHQvAGOKHKiHgbTWAjatKXRbsAjNXnyPG41L7Dr/2Ep wYYwXUE6tpeYq1f056m7R2LzZVQS8gpw70azF83/LoYYSOV5rV4unnBeqoaWmXTJ 9OCgr+HbEOquAIdvtWb36Yb2eNImrxoplwlN6DyUpn1IZcCcRXAEoEaF2pX5OEDw e6tOB5WY1XADBCzAnCXff0YAPeSOgsUAB49SQBa+Ul7bzznhFpA= =eviw -----END PGP SIGNATURE----- --=-=-=--