aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-10-01 14:50:22 +0200
committerLars Ingebrigtsen2022-10-01 14:51:07 +0200
commit41234a21bf7d6713491ce60501bbf2d211fbac8e (patch)
tree230198436e145b6615d29a46d99d16cff140f1bf
parent82860cb7f7a92a75c08637a5aa5f1fcb2b6f2cc5 (diff)
downloademacs-41234a21bf7d6713491ce60501bbf2d211fbac8e.tar.gz
emacs-41234a21bf7d6713491ce60501bbf2d211fbac8e.zip
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.
-rw-r--r--lisp/url/url.el4
1 files changed, 3 insertions, 1 deletions
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."
280 ;; Querying over consumer internet in the US takes 100 280 ;; Querying over consumer internet in the US takes 100
281 ;; ms, so split the difference. 281 ;; ms, so split the difference.
282 (accept-process-output nil 0.05))) 282 (accept-process-output nil 0.05)))
283 (unless (eq data-buffer proc-buffer) 283 ;; Kill the process buffer on redirects.
284 (when (and data-buffer
285 (not (eq data-buffer proc-buffer)))
284 (let (kill-buffer-query-functions) 286 (let (kill-buffer-query-functions)
285 (kill-buffer proc-buffer))))) 287 (kill-buffer proc-buffer)))))
286 data-buffer)) 288 data-buffer))