mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
url-retrieve-synchronously: Fix timeout when connection hangs
* lisp/url/url.el (url-retrieve-synchronously): Set url-asynchronous to t when TIMEOUT is non-nil (bug#71295).
This commit is contained in:
parent
e9a0256a55
commit
e2527dd9fd
1 changed files with 2 additions and 1 deletions
|
|
@ -235,7 +235,8 @@ If INHIBIT-COOKIES is non-nil, refuse to store cookies. If
|
|||
TIMEOUT is passed, it should be a number that says (in seconds)
|
||||
how long to wait for a response before giving up."
|
||||
(url-do-setup)
|
||||
(let* (url-asynchronous
|
||||
(let* (;; Ensure we can stop during connection setup (bug#71295).
|
||||
(url-asynchronous (not (null timeout)))
|
||||
data-buffer
|
||||
(callback (lambda (&rest _args)
|
||||
(setq data-buffer (current-buffer))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue