diff mbox series

[bug#39873,1/3] substitute: Use the same port for multiple request batches.

Message ID 20200302210735.13337-1-mail@cbaines.net
State Accepted
Headers show
Series http-multiple-get enhancements | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Christopher Baines March 2, 2020, 9:07 p.m. UTC
In http-multiple-get.

* guix/scripts/substitute.scm (http-multiple-get): Switch port to p in one
occurrence.
---
 guix/scripts/substitute.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ludovic Courtès March 7, 2020, 9:12 p.m. UTC | #1
Hi Christopher!

Christopher Baines <mail@cbaines.net> skribis:

> In http-multiple-get.

Leftover?  :-)

> * guix/scripts/substitute.scm (http-multiple-get): Switch port to p in one
> occurrence.
> ---
>  guix/scripts/substitute.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
> index dfb975a24a..5ed43d36c9 100755
> --- a/guix/scripts/substitute.scm
> +++ b/guix/scripts/substitute.scm
> @@ -545,7 +545,7 @@ initial connection on which HTTP requests are sent."
>               (()
>                (reverse result))
>               (remainder
> -              (connect port remainder result))))
> +              (connect p remainder result))))

LGTM!

Did you notice an occurrence of this bug somewhere?

Ludo’.
Christopher Baines March 9, 2020, 12:07 a.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Hi Christopher!
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> In http-multiple-get.
>
> Leftover?  :-)

No, just clarifying what function is being referred to. Although the
line below reveals that also.

>> * guix/scripts/substitute.scm (http-multiple-get): Switch port to p in one
>> occurrence.
>> ---
>>  guix/scripts/substitute.scm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
>> index dfb975a24a..5ed43d36c9 100755
>> --- a/guix/scripts/substitute.scm
>> +++ b/guix/scripts/substitute.scm
>> @@ -545,7 +545,7 @@ initial connection on which HTTP requests are sent."
>>               (()
>>                (reverse result))
>>               (remainder
>> -              (connect port remainder result))))
>> +              (connect p remainder result))))
>
> LGTM!
>
> Did you notice an occurrence of this bug somewhere?

I was looking for something that could be going wrong here as I was
seeing some kind of error talking to Cuirass using this in the Guix Data
Service, and happened to notice this in the code.
diff mbox series

Patch

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index dfb975a24a..5ed43d36c9 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -545,7 +545,7 @@  initial connection on which HTTP requests are sent."
              (()
               (reverse result))
              (remainder
-              (connect port remainder result))))
+              (connect p remainder result))))
           ((head tail ...)
            (let* ((resp   (read-response p))
                   (body   (response-body-port resp))