Bail out in nnimap if the server has closed the connection.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 29 Jun 2011 23:09:38 +0000 (01:09 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 29 Jun 2011 23:09:38 +0000 (01:09 +0200)
lisp/ChangeLog
lisp/message.el
lisp/nnimap.el

index 12e5633..b95f36e 100644 (file)
@@ -1,3 +1,11 @@
+2011-06-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * message.el (message-send-mail-function): Add `sendmail-query-once'.
+
+       * nnimap.el (nnimap-finish-retrieve-group-infos): If the server has
+       ended the connection, bail out before waiting infinitely on a new
+       connection.
+
 2011-06-28  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-msg.el (gnus-bug): Add Package and Version pseudo-headers to bug
index 8f58402..ff5f619 100644 (file)
@@ -686,6 +686,7 @@ Done before generating the new subject of a forward."
 (defcustom message-send-mail-function
   (cond ((eq send-mail-function 'smtpmail-send-it) 'message-smtpmail-send-it)
        ((eq send-mail-function 'feedmail-send-it) 'feedmail-send-it)
+       ((eq send-mail-function 'sendmail-query-once) 'sendmail-query-once)
        ((eq send-mail-function 'mailclient-send-it)
         'message-send-mail-with-mailclient)
        (t (message-send-mail-function)))
index 2cfc889..e78c20b 100644 (file)
@@ -1227,6 +1227,10 @@ textual parts.")
 
 (deffoo nnimap-finish-retrieve-group-infos (server infos sequences)
   (when (and sequences
+            ;; Check that the process is still alive.
+            (get-buffer-process (nnimap-buffer))
+            (memq (process-status (get-buffer-process (nnimap-buffer)))
+                  '(open run))
             (nnimap-possibly-change-group nil server))
     (with-current-buffer (nnimap-buffer)
       ;; Wait for the final data to trickle in.