Mercurial > emacs
diff lisp/gnus/pop3.el @ 86225:166a6141ae98
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-933
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 19 Nov 2007 05:50:39 +0000 |
parents | 1cdfc94602cb |
children | 9c91533a901a 53108e6cea98 |
line wrap: on
line diff
--- a/lisp/gnus/pop3.el Mon Nov 19 00:25:31 2007 +0000 +++ b/lisp/gnus/pop3.el Mon Nov 19 05:50:39 2007 +0000 @@ -242,16 +242,23 @@ mailhost port))) (when process ;; There's a load of info printed that needs deleting. - (while (when (memq (process-status process) '(open run)) - (pop3-accept-process-output process) - (goto-char (point-max)) - (forward-line -1) - (if (looking-at "\\+OK") - (progn - (delete-region (point-min) (point)) - nil) + (let ((again 't)) + ;; repeat until + ;; - either we received the +OK line + ;; - or accept-process-output timed out without getting + ;; anything + (while (and again + (setq again (memq (process-status process) + '(open run)))) + (setq again (pop3-accept-process-output process)) + (goto-char (point-max)) + (forward-line -1) + (cond ((looking-at "\\+OK") + (setq again nil) + (delete-region (point-min) (point))) + ((not again) (pop3-quit process) - (error "POP SSL connexion failed")))) + (error "POP SSL connexion failed"))))) process))) ((eq pop3-stream-type 'starttls) ;; gnutls-cli, openssl don't accept service names