From: Magnus Henoch Date: Thu, 12 Oct 2006 19:59:58 +0000 (+0000) Subject: (url-http-find-free-connection): Handle url-open-stream returning nil. X-Git-Tag: emacs-pretest-22.0.90~147 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dfea17e083019b71fd5cb2ccb740b45232bf9fcd;p=emacs.git (url-http-find-free-connection): Handle url-open-stream returning nil. --- diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index dae82b2b900..2aa14af8983 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2006-10-12 Magnus Henoch + + * url-http.el (url-http-find-free-connection): Handle + url-open-stream returning nil. + 2006-10-11 Magnus Henoch * url-https.el: Remove (clashes with url-http on 8+3 systems). diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 3e74839dcb9..bf8069ded7e 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -123,8 +123,10 @@ request.") ;; like authentication. But we use another buffer afterwards. (unwind-protect (let ((proc (url-open-stream host buf host port))) - ;; Drop the temp buffer link before killing the buffer. - (set-process-buffer proc nil) + ;; url-open-stream might return nil. + (when (processp proc) + ;; Drop the temp buffer link before killing the buffer. + (set-process-buffer proc nil)) proc) (kill-buffer buf)))))))