guix-devel
[Top][All Lists]
Advanced

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

[PATCH] scripts: substitute: Avoid infinite looping when updating the su


From: Andy Patterson
Subject: [PATCH] scripts: substitute: Avoid infinite looping when updating the substitute list
Date: Sun, 5 Jul 2015 20:21:06 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi,

I was having trouble using substitutes, so I decided to investigate it.
I found out that when retrieving the batch of .narinfo files from the
server, my connection was always being closed after the first response.
Therefore, I would always be reconnecting to the server with every
request in the batch still to process, and this reconnecting would be
repeated infinitely, or at least until my Internet went down. Based on
the documentation for the "connection: close" header, I think that this
first response should be complete, so we can use it. Maybe I'm wrong;
I'm not totally familiar with how http works.

I also considered ensuring that a good response code was received, but
the handler deals with error response codes as well, so it seemed
superfluous.

This patch will make use of the last response from the server, before
reconnecting to try the next one. With it I was able to successfully
build and run links.

Let me know if my understanding is off, or if there's a better approach.

Thanks,

Andy

Attachment: 0001-scripts-substitute-Avoid-infinite-looping-when-updat.patch
Description: Text Data


reply via email to

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