(smtpmail-query-smtp-server): Allow `quit'-ing out in case the probe hangs.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 21 Aug 2011 20:29:11 +0000 (22:29 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 21 Aug 2011 20:29:11 +0000 (22:29 +0200)
lisp/ChangeLog
lisp/mail/smtpmail.el

index f247abd..02c88ea 100644 (file)
@@ -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>
 
index f905eea..40fbb07 100644 (file)
@@ -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)))