From c72e141eb45323625d52c505cdf1edccec6fcfc8 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 9 Sep 2023 11:00:35 +0100 Subject: Remove set-socket-timeout As I don't think it's useful on non blocking sockets. --- nar-herder/cached-compression.scm | 2 -- nar-herder/mirror.scm | 2 -- nar-herder/storage.scm | 2 -- nar-herder/utils.scm | 7 ------- 4 files changed, 13 deletions(-) diff --git a/nar-herder/cached-compression.scm b/nar-herder/cached-compression.scm index 73eb789..dd542ec 100644 --- a/nar-herder/cached-compression.scm +++ b/nar-herder/cached-compression.scm @@ -475,8 +475,6 @@ (let ((port socket (open-socket-for-uri* uri))) - (set-socket-timeout socket #:seconds 30) - (http-get uri #:port port #:decode-body? #f diff --git a/nar-herder/mirror.scm b/nar-herder/mirror.scm index 56e1299..19c1be9 100644 --- a/nar-herder/mirror.scm +++ b/nar-herder/mirror.scm @@ -81,8 +81,6 @@ (let ((port socket (open-socket-for-uri* uri))) - (set-socket-timeout socket #:seconds 20) - (http-get uri #:port port #:decode-body? #f))) diff --git a/nar-herder/storage.scm b/nar-herder/storage.scm index 212c55e..99153b3 100644 --- a/nar-herder/storage.scm +++ b/nar-herder/storage.scm @@ -541,8 +541,6 @@ When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates." (let ((port socket (open-socket-for-uri* uri))) - (set-socket-timeout socket #:seconds 30) - (http-get uri #:port port #:decode-body? #f diff --git a/nar-herder/utils.scm b/nar-herder/utils.scm index 552ef02..b841d83 100644 --- a/nar-herder/utils.scm +++ b/nar-herder/utils.scm @@ -54,7 +54,6 @@ check-locale! - set-socket-timeout open-socket-for-uri* call-with-sigint @@ -544,12 +543,6 @@ If already in the worker thread, call PROC immediately." (duration-logger duration)) (apply values result))))))) -(define* (set-socket-timeout port #:key (seconds 120)) - (when (defined? 'SO_RCVTIMEO) - ;; This is only supported on Guile 3.0.9 and later - (setsockopt port SOL_SOCKET SO_RCVTIMEO `(,seconds . 0)) - (setsockopt port SOL_SOCKET SO_SNDTIMEO `(,seconds . 0)))) - (define* (open-socket-for-uri* uri #:key (verify-certificate? #t)) (define tls-wrap -- cgit v1.2.3