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 /lisp/mail/smtpmail.el | |
parent | e7f2c178da01a77d782aedae40f5578a48ddedba (diff) | |
download | emacs-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.el | 6 |
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))) |