http-client: Remove exception mishandling in 'http-multiple-get'.
Partly fixes <https://bugs.gnu.org/47867>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. The non-tail recursive call to 'connect' could cause requests to be processed twice, with 'p' possibly closed the second time. Regression introduced inmaster205833b72c
and carried over in45fce38fb0
. * guix/http-client.scm (http-multiple-get): Remove call to 'close-port' and recursive call to 'connect' when the 'write-request' block returns #f.
parent
02d62978f4
commit
c50db7156d
|
@ -214,15 +214,14 @@ returning."
|
|||
;; Inherit the HTTP proxying property from P.
|
||||
(set-http-proxy-port?! buffer (http-proxy-port? p))
|
||||
|
||||
(unless (false-if-networking-error
|
||||
(begin
|
||||
(for-each (cut write-request <> buffer) batch)
|
||||
(put-bytevector p (get))
|
||||
(force-output p)
|
||||
#t))
|
||||
;; If PORT becomes unusable, open a fresh connection and retry.
|
||||
(close-port p) ; close the broken port
|
||||
(connect #f requests result)))
|
||||
;; Swallow networking errors that could occur due to connection reuse
|
||||
;; and the like; they will be handled down the road when trying to
|
||||
;; read responses.
|
||||
(false-if-networking-error
|
||||
(begin
|
||||
(for-each (cut write-request <> buffer) batch)
|
||||
(put-bytevector p (get))
|
||||
(force-output p))))
|
||||
|
||||
;; Now start processing responses.
|
||||
(let loop ((sent batch)
|
||||
|
|
Reference in New Issue