aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen <[email protected]>2012-02-19 09:49:09 +0100
committerLars Ingebrigtsen <[email protected]>2012-02-19 09:49:09 +0100
commit55645c67978eb15884ed5ca919b1691b3715e3ad (patch)
treec60c1ea32786fe5cba3bd47a8e85a1f6c97b48cc
parent20af23949ddcb8b4b2ca54c51911117415f2d46a (diff)
Make url-queue not kill a random buffer on error
* 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.
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-queue.el2
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 8f3e399786..e9e7a521c1 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-19 Lars Ingebrigtsen <[email protected]>
+
+ * 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 <[email protected]>
* url-queue.el (url-queue-kill-job): Refactored out code.
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el
index 1fc33dd22f..6456d44c42 100644
--- a/lisp/url/url-queue.el
+++ b/lisp/url/url-queue.el
@@ -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))))