Subject: bug#60154: ‘guix substitute’ gets stuck when connection goes down

From: Ludovic Courtès <[email-masked]>
Date: Sat, 17 Dec 2022 12:14:14 +0100

As noted while debugging <https://issues.guix.gnu.org/59784>, turning
off networking while ‘guix substitute’ is downloading (be it with
“ifconfig X down” or by physically unplugging the cable) leads it to be
stuck in ‘read’ or ‘recvfrom’ for a long time.

Most likely this can be addressed by setting SO_RCVTIMEO and SO_SNDTIMEO
to a reasonable value on the socket.

Ludo’.