Extend the methods so that we're sure to get unique server names.
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 21 Feb 2011 04:54:10 +0000 (20:54 -0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 21 Feb 2011 04:54:10 +0000 (20:54 -0800)
And we don't output two async commands in the same buffer.  This fixes
an NNTP hang for some users.

lisp/ChangeLog
lisp/gnus-start.el

index 2797ff3..4ebc324 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-21  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-start.el (gnus-get-unread-articles): Extend the methods so that
+       we're sure to get unique server names, and we don't output two async
+       commands in the same buffer.  This fixes an NNTP hang for some users.
+
 2011-02-21  Lars Magne Ingebrigtsen  <lars@ingebrigtsen.no>
 
        * gnus.el: No Gnus v0.11 is released.
index b493a93..e5e2468 100644 (file)
@@ -1675,7 +1675,20 @@ If SCAN, request a scan of that group as well."
                (lambda (c1 c2)
                  (< (gnus-method-rank (cadr c1) (car c1))
                     (gnus-method-rank (cadr c2) (car c2))))))
-
+    ;; Go through the list of servers and possibly extend methods that
+    ;; aren't equal (and that need extension; i.e., they are async).
+    (let ((methods nil))
+      (dolist (elem type-cache)
+       (destructuring-bind (method method-type infos dummy) elem
+         (let ((gnus-opened-servers methods))
+           (when (and (gnus-similar-server-opened method)
+                      (gnus-check-backend-function
+                       'retrieve-group-data-early (car method)))
+             (setq method (gnus-server-extend-method
+                           (gnus-info-group (car infos))
+                           method))
+             (setcar elem method))
+           (push (list method 'ok) methods)))))
     ;; Start early async retrieval of data.
     (dolist (elem type-cache)
       (destructuring-bind (method method-type infos dummy) elem