[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: url-retrieve may cause hang

From: Kim F. Storm
Subject: Re: url-retrieve may cause hang
Date: Tue, 17 Oct 2006 10:05:02 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Magnus Henoch <address@hidden> writes:

> David Reitter <address@hidden> 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?

I doubt it is very tricky to do.  

You should check with (featurep 'make-network-process '(:nowait t))
to see if non-blocking connect is possible, and fallback to
the current blocking code if not.

Try making the change -- then we can look at the patches and judge
whether it is ok to install before the release (if it hasn't happened

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]