Have no outstanding messages if the IMAP server doesn't support streaming.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 24 Oct 2010 19:23:58 +0000 (21:23 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 24 Oct 2010 19:23:58 +0000 (21:23 +0200)
lisp/ChangeLog
lisp/nnimap.el

index c6d07ec..3df1e30 100644 (file)
@@ -4,6 +4,8 @@
        (nnimap-request-move-article): Try to be slighly faster by not
        requesting the entire message when moving.
        (nnimap-transform-headers): Don't bug out on bodiless articles.
+       (nnimap-send-command): Have no outstanding messages if the IMAP server
+       doesn't support streaming.
 
 2010-10-24  Julien Danjou  <julien@danjou.info>
 
index 9013206..305b62d 100644 (file)
@@ -1048,12 +1048,7 @@ textual parts.")
                                               (utf7-encode group t))
                          (nnimap-send-command "UID FETCH %d:* FLAGS" start)
                          start group command)
-                   sequences)))
-         ;; Some servers apparently can't have many outstanding
-         ;; commands, so throttle them.
-         (when (and (not nnimap-streaming)
-                    (car sequences))
-           (nnimap-wait-for-response (caar sequences))))
+                   sequences))))
        sequences))))
 
 (deffoo nnimap-finish-retrieve-group-infos (server infos sequences)
@@ -1431,6 +1426,10 @@ textual parts.")
            (if (nnimap-newlinep nnimap-object)
                ""
              "\r"))))
+  ;; Some servers apparently can't have many outstanding
+  ;; commands, so throttle them.
+  (unless nnimap-streaming
+    (nnimap-wait-for-response nnimap-sequence))
   nnimap-sequence)
 
 (defun nnimap-log-command (command)