unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Magnus Henoch <mange@freemail.hu>
Subject: Re: url-retrieve may cause hang
Date: Tue, 17 Oct 2006 02:42:44 +0200	[thread overview]
Message-ID: <878xjfydq3.fsf@freemail.hu> (raw)
In-Reply-To: E7F43645-4FE6-4103-8879-F554E28C8DD9@gmail.com

David Reitter <david.reitter@gmail.com> writes:

> url-retrieve may cause Emacs to hang for around 3 minutes when the
> firewall is configured to delay packets. This is unwanted behavior,
> as url-retrieve claims to work asynchronously.
>
> Example:
>
> Configure firewall to delay (rather than deny) packets:
>
> sudo ipfw add 1 pipe 7 tcp from any to any 80
>
> (url-retrieve  "http://www.google.com" 'print)
> % or use url-http for this
>
> -> Hang until time-out (several minutes).

The problem is in url-open-stream in url-gw.el.  The URL library uses
open-network-stream, which blocks until the connection is established
(or times out, in this case).  url-retrieve is indeed asynchronous
when the connection is established.

It should use make-network-process with appropriate arguments, and set
up sentinels and such, which is the first thing I intend to do after
the release, as it might be tricky to get it right.  Or should I
change my plan and do it now?

Magnus

  reply	other threads:[~2006-10-17  0:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-16 22:33 url-retrieve may cause hang David Reitter
2006-10-17  0:42 ` Magnus Henoch [this message]
2006-10-17  8:05   ` Kim F. Storm
2006-10-17 14:57     ` Magnus Henoch
2006-10-17 15:38       ` Stefan Monnier
2006-10-23  2:01         ` Magnus Henoch
2006-10-23 11:45           ` Richard Stallman
2006-10-25 14:22             ` Chong Yidong
2006-10-25 23:00               ` Magnus Henoch
2006-10-26  5:23               ` Richard Stallman
2006-10-17 16:24       ` Magnus Henoch
2006-10-17 17:48       ` David Reitter
2006-10-18 16:23         ` Michaël Cadilhac
2006-10-18  5:12       ` Richard Stallman
2006-10-18  9:03         ` Magnus Henoch
2006-10-18 14:01           ` Stefan Monnier
2006-10-18 17:54           ` Richard Stallman

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=878xjfydq3.fsf@freemail.hu \
    --to=mange@freemail.hu \
    /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).