From dfea17e083019b71fd5cb2ccb740b45232bf9fcd Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Thu, 12 Oct 2006 19:59:58 +0000 Subject: [PATCH] (url-http-find-free-connection): Handle url-open-stream returning nil. --- lisp/url/ChangeLog | 5 +++++ lisp/url/url-http.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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))))))) -- 2.39.2