]> git.eshelyaron.com Git - emacs.git/commitdiff
Make url-queue not kill a random buffer on error
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 19 Feb 2012 08:49:09 +0000 (09:49 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 19 Feb 2012 08:49:09 +0000 (09:49 +0100)
* url-queue.el (url-queue-callback-function): Remove the job from
the queue so that we don't kill the current buffer, which will
then make the callback function kill a random buffer.

lisp/url/ChangeLog
lisp/url/url-queue.el

index 8f3e3997869de8d1823749e9dda37256c1b5c5b3..e9e7a521c1ac495e2539918fc6f8254d8064dd6d 100644 (file)
@@ -1,3 +1,9 @@
+2012-02-19  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * url-queue.el (url-queue-callback-function): Remove the job from
+       the queue so that we don't kill the current buffer, which will
+       then make the callback function kill a random buffer.
+
 2012-02-14  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * url-queue.el (url-queue-kill-job): Refactored out code.
index 1fc33dd22f1419344e9424806020f74ea47ef225..6456d44c423a4ae3b415fe3a1ff1fd8f4da0e589 100644 (file)
@@ -108,6 +108,7 @@ The variable `url-queue-timeout' sets a timeout."
       (url-queue-start-retrieve waiting))))
 
 (defun url-queue-callback-function (status job)
+  (setq url-queue (delq job url-queue))
   (when (and (eq (car status) :error)
             (eq (cadr (cadr status)) 'connection-failed))
     ;; If we get a connection error, then flush all other jobs from
@@ -116,7 +117,6 @@ The variable `url-queue-timeout' sets a timeout."
     ;; synchronously and totally halts Emacs.
     (url-queue-remove-jobs-from-host
      (plist-get (nthcdr 3 (cadr status)) :host)))
-  (setq url-queue (delq job url-queue))
   (url-queue-run-queue)
   (apply (url-queue-callback job) (cons status (url-queue-cbargs job))))