diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-08-21 22:29:11 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-08-21 22:29:11 +0200 |
commit | 7185da524d81acaaa872f8f803870d8c57c8b4c9 (patch) | |
tree | 288000ccd4bb36a3e107d7120f8d33d40b28f169 | |
parent | e7f2c178da01a77d782aedae40f5578a48ddedba (diff) | |
download | emacs-7185da524d81acaaa872f8f803870d8c57c8b4c9.tar.gz |
(smtpmail-query-smtp-server): Allow `quit'-ing out in case the probe hangs.
-rw-r--r-- | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/mail/smtpmail.el | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f247abdd468..02c88eae667 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,8 @@ `coding-system-for-*' around the process open call to avoid auth-source side effects. (smtpmail-try-auth-methods): Expand the secret password. + (smtpmail-query-smtp-server): Allow `quit'-ing out in case the + probe hangs. 2011-08-21 Chong Yidong <cyd@stupidchicken.com> 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))) |