[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: url.el blocks Gnus+nnrss
From: |
Klaus Straubinger |
Subject: |
Re: url.el blocks Gnus+nnrss |
Date: |
Tue, 25 Jan 2005 15:32:06 +0100 (CET) |
> I've myself been using the patch below for a while now (it basically does
> the same as yours, except it hoists the get-buffer-process outside the loop
> and it removes the timeout since it shouldn't be needed now that Emacs knows
> what we're waiting for).
>
> I've just installed it.
For me the patch provided a big improvement, but I still observed hangs -
as far as I could determine, always in connections without specified
Content-Length. I think the reason for this is that in these cases
url-http-simple-after-change-function is used which does not call the
callback function at the end, as opposed to
url-http-content-length-after-change-function. This leads to a hang in
accept-process-output when the connection already has been closed.
The following patch did help me, although I am not sure if it is the
right way to tackle the problem:
--- url.el.orig 2005-01-14 13:36:36.000000000 +0100
+++ url.el 2005-01-25 14:47:52.325350728 +0100
@@ -176,7 +176,7 @@
;; similar that takes processing completely outside of the URL
;; package.
nil
- (while (not retrieval-done)
+ (while (null retrieval-done)
(url-debug 'retrieval
"Spinning in url-retrieve-synchronously: %S (%S)"
retrieval-done asynch-buffer)
@@ -185,11 +185,13 @@
;; interrupt it before it got a chance to handle process input.
;; `sleep-for' was tried but it lead to other forms of
;; hanging. --Stef
- (unless (accept-process-output proc)
- ;; accept-process-output returned nil, maybe because the process
- ;; exited (and may have been replaced with another).
- (setq proc (get-buffer-process asynch-buffer)))))
- asynch-buffer)))
+ (if (eq (process-status proc) 'closed)
+ (setq retrieval-done t)
+ (unless (accept-process-output proc)
+ ;; accept-process-output returned nil, maybe because the process
+ ;; exited (and may have been replaced with another).
+ (setq proc (get-buffer-process asynch-buffer)))))))
+ asynch-buffer))
(defun url-mm-callback (&rest ignored)
(let ((handle (mm-dissect-buffer t)))
--
Klaus Straubinger