From 122d94635f0a94b20ddb15c529fe1f5c7024fe05 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 14 Nov 2011 17:09:13 +0100 Subject: [PATCH] If the server hangs up while we're talking to it, just `message' the error instead of throwing an error. --- lisp/url/ChangeLog | 6 ++++++ lisp/url/url-http.el | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index a2a1b451258..5eb22bb8614 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,9 @@ +2011-11-14 Lars Magne Ingebrigtsen + + * url-http.el (url-http-async-sentinel): If the server hangs up + while we're talking to it, just `message' the error instead of + throwing an error. + 2011-11-03 Lars Magne Ingebrigtsen * url-cookie.el (url-cookie-expired-p): Protect against diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 6e192cd5aae..e9da4a1010c 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1255,7 +1255,11 @@ CBARGS as the arguments." (url-http-end-of-document-sentinel proc why)) ((string= (substring why 0 4) "open") (setq url-http-connection-opened t) - (process-send-string proc (url-http-create-request))) + (condition-case error + (process-send-string proc (url-http-create-request)) + (file-error + (setq url-http-connection-opened nil) + (message "HTTP error: %s" error)))) (t (setf (car url-callback-arguments) (nconc (list :error (list 'error 'connection-failed why -- 2.39.2