forked from tribes/guix
4574af27f2
Only connection establishment was bounded by a timeout, so a substitute server that accepted a connection but then stalled would block 'substitute --query' and nar downloads indefinitely. Set a read timeout on substitute connections so a stalled server is eventually abandoned and the next URL is tried. * guix/scripts/substitute.scm (%fetch-read-timeout): New variable. (open-connection-for-uri/cached): Add #:read-timeout defaulting to %fetch-read-timeout; pass it to 'guix:open-connection-for-uri' and on the recursive call.