Commit f15bcb40 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Kill jobs that we remove from the queue

* url-queue.el (url-queue-kill-job): Refactored out code.
(url-queue-remove-jobs-from-host): Use it to kill jobs that are in
flight.
parent 6546b134
2012-02-14 Lars Ingebrigtsen <larsi@gnus.org>
* url-queue.el (url-queue-kill-job): Refactored out code.
(url-queue-remove-jobs-from-host): Use it to kill jobs that are in
flight.
2012-02-14 Teodor Zlatanov <tzz@lifelogs.com>
* url-future.el: Minor doc update.
......
......@@ -127,6 +127,7 @@ The variable `url-queue-timeout' sets a timeout."
host)
(push job jobs)))
(dolist (job jobs)
(url-queue-kill-job job)
(setq url-queue (delq job url-queue)))))
(defun url-queue-start-retrieve (job)
......@@ -146,14 +147,17 @@ The variable `url-queue-timeout' sets a timeout."
url-queue-timeout))
(push job dead-jobs)))
(dolist (job dead-jobs)
(when (bufferp (url-queue-buffer job))
(while (get-buffer-process (url-queue-buffer job))
(ignore-errors
(delete-process (get-buffer-process (url-queue-buffer job)))))
(ignore-errors
(kill-buffer (url-queue-buffer job))))
(url-queue-kill-job job)
(setq url-queue (delq job url-queue)))))
(defun url-queue-kill-job (job)
(when (bufferp (url-queue-buffer job))
(while (get-buffer-process (url-queue-buffer job))
(ignore-errors
(delete-process (get-buffer-process (url-queue-buffer job)))))
(ignore-errors
(kill-buffer (url-queue-buffer job)))))
(provide 'url-queue)
;;; url-queue.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment