summaryrefslogtreecommitdiff
path: root/lisp/mail/smtpmail.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-08-21 22:29:11 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-08-21 22:29:11 +0200
commit7185da524d81acaaa872f8f803870d8c57c8b4c9 (patch)
tree288000ccd4bb36a3e107d7120f8d33d40b28f169 /lisp/mail/smtpmail.el
parente7f2c178da01a77d782aedae40f5578a48ddedba (diff)
downloademacs-7185da524d81acaaa872f8f803870d8c57c8b4c9.tar.gz
(smtpmail-query-smtp-server): Allow `quit'-ing out in case the probe hangs.
Diffstat (limited to 'lisp/mail/smtpmail.el')
-rw-r--r--lisp/mail/smtpmail.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index f905eea8405..40fbb072594 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -602,8 +602,10 @@ The list is in preference order.")
(push smtpmail-smtp-server ports))
(while (and (not smtpmail-smtp-server)
(setq port (pop ports)))
- (when (setq stream (ignore-errors
- (open-network-stream "smtp" nil server port)))
+ (when (setq stream (condition-case ()
+ (open-network-stream "smtp" nil server port)
+ (quit nil)
+ (error nil)))
(customize-save-variable 'smtpmail-smtp-server server)
(customize-save-variable 'smtpmail-smtp-service port)
(delete-process stream)))