From: Lars Ingebrigtsen Date: Sat, 1 Oct 2022 12:50:22 +0000 (+0200) Subject: Fix url-retrieve-synchronously on very short timeouts X-Git-Tag: emacs-29.0.90~1856^2~105 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=41234a21bf7d6713491ce60501bbf2d211fbac8e;p=emacs.git Fix url-retrieve-synchronously on very short timeouts * lisp/url/url.el (url-retrieve-synchronously): Don't kill the process buffer unless we made one (bug#58218). This makes HTTP free connection marking work on premature timeouts. --- diff --git a/lisp/url/url.el b/lisp/url/url.el index d08ff04eda9..b4ece5faeb2 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -280,7 +280,9 @@ how long to wait for a response before giving up." ;; Querying over consumer internet in the US takes 100 ;; ms, so split the difference. (accept-process-output nil 0.05))) - (unless (eq data-buffer proc-buffer) + ;; Kill the process buffer on redirects. + (when (and data-buffer + (not (eq data-buffer proc-buffer))) (let (kill-buffer-query-functions) (kill-buffer proc-buffer))))) data-buffer))