From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: z@bcc32.com, 71295@debbugs.gnu.org, azeng@janestreet.com
Subject: bug#71295: 29.3; url-retrieve-synchronously does not timeout if initial connection hangs
Date: Sun, 9 Jun 2024 01:34:03 +0300 [thread overview]
Message-ID: <57c87a3e-d2bc-45aa-9c67-5ad62e82481f@gutov.dev> (raw)
In-Reply-To: <86r0d8dl08.fsf@gnu.org>
On 08/06/2024 09:08, Eli Zaretskii wrote:
>> This seems to work:
>>
>> diff --git a/lisp/url/url.el b/lisp/url/url.el
>> index dea251b453b..3b4021ceca8 100644
>> --- a/lisp/url/url.el
>> +++ b/lisp/url/url.el
>> @@ -235,7 +235,7 @@ url-retrieve-synchronously
>> 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* ((url-asynchronous t)
>> data-buffer
>> (callback (lambda (&rest _args)
>> (setq data-buffer (current-buffer))
>
> Fine by me to install this on master, but please add there a comment
> explaining why we do that disregarding the "synchronously" part of the
> API's name.
>
> Did you consider binding url-asynchronous non-nil only if TIMEOUT is
> omitted or nil? That could be even better, since the risk of breaking
> something is lower, and OTOH if TIMEOUT is not passed, the original
> problem does not exist and waiting "forever" is justified. WDYT?
That's a good idea. Pushed to master, with this addition and a comment.
Thinking further, though, our ability to do so bring the existence of
this variable into question (we only change it in
url-retrieve-synchronously).
I see it's been added as part of bug#26835 resolution, so maybe we'll
need to re-examine that fix.
next prev parent reply other threads:[~2024-06-08 22:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 16:21 bug#71295: 29.3; url-retrieve-synchronously does not timeout if initial connection hangs Aaron Zeng
2024-06-01 19:38 ` Eli Zaretskii
2024-06-04 0:09 ` Aaron Zeng
2024-06-06 11:40 ` Eli Zaretskii
2024-06-06 20:41 ` Dmitry Gutov
2024-06-07 6:20 ` Eli Zaretskii
2024-06-07 21:32 ` Dmitry Gutov
2024-06-08 6:08 ` Eli Zaretskii
2024-06-08 22:34 ` Dmitry Gutov [this message]
2024-06-09 4:39 ` Eli Zaretskii
2024-06-09 22:05 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57c87a3e-d2bc-45aa-9c67-5ad62e82481f@gutov.dev \
--to=dmitry@gutov.dev \
--cc=71295@debbugs.gnu.org \
--cc=azeng@janestreet.com \
--cc=eliz@gnu.org \
--cc=z@bcc32.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).