(nnimap-finish-retrieve-group-infos): Check the connection status in the correct...
authorLars Magne Ingebrigtsen <larsi@stories.(none)>
Tue, 3 Jan 2012 21:21:24 +0000 (22:21 +0100)
committerLars Magne Ingebrigtsen <larsi@stories.(none)>
Tue, 3 Jan 2012 21:21:24 +0000 (22:21 +0100)
If a different IMAP server closed the connection, we would check the
connection status before we had changed the defvoo variables around,
so we would check the status on the previous server's connection.

Reported by Didier Verna.

lisp/ChangeLog
lisp/nnimap.el

index fdf8b5a..33cb4dc 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * nnimap.el (nnimap-finish-retrieve-group-infos): Check the connection
+       status in the correct buffer.
+
 2012-01-03  Leo  <sdl.web@gmail.com>  (tiny change)
 
        * gnus-topic.el (gnus-topic-goto-next-group): Don't move point around
index 429b745..32319f7 100644 (file)
@@ -1273,11 +1273,11 @@ textual parts.")
 
 (deffoo nnimap-finish-retrieve-group-infos (server infos sequences)
   (when (and sequences
+            (nnimap-possibly-change-group nil server)
             ;; 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))
+                  '(open run)))
     (with-current-buffer (nnimap-buffer)
       ;; Wait for the final data to trickle in.
       (when (nnimap-wait-for-response (if (eq (cadar sequences) 'qresync)