]> git.eshelyaron.com Git - emacs.git/commitdiff
Set Gnus server 'closed status in gnus-close-server
authorEric Abrahamsen <eric@ericabrahamsen.net>
Thu, 27 Aug 2020 15:00:14 +0000 (08:00 -0700)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Thu, 27 Aug 2020 21:19:07 +0000 (14:19 -0700)
* lisp/gnus/gnus-int.el (gnus-close-server): Set 'closed status here.
* lisp/gnus/gnus-group.el (gnus-group-suspend): Not here.

lisp/gnus/gnus-group.el
lisp/gnus/gnus-int.el

index 97e10a37a21b3051b7bb6f6f95c18f2755127994..d613bc86ad7cae66da6dc98dbb4e6f717afb470b 100644 (file)
@@ -4300,8 +4300,7 @@ The hook `gnus-suspend-gnus-hook' is called before actually suspending."
     ;; Closing all the backends is useful (for instance) when when the
     ;; IP addresses have changed and you need to reconnect.
     (dolist (elem gnus-opened-servers)
-      (gnus-close-server (car elem))
-      (setcar (cdr elem) 'closed))
+      (gnus-close-server (car elem)))
     (when group-buf
       (bury-buffer group-buf)
       (delete-windows-on group-buf t))))
index 60ebc07c343f12bdde2ac62194f879e26d5cabc5..da385a18023cd31a833a3989fbfedbf51f2a8b25 100644 (file)
@@ -351,9 +351,12 @@ If it is down, start it up (again)."
   "Close the connection to GNUS-COMMAND-METHOD."
   (when (stringp gnus-command-method)
     (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
-  (funcall (gnus-get-function gnus-command-method 'close-server)
-          (nth 1 gnus-command-method)
-          (nthcdr 2 gnus-command-method)))
+  (prog1
+      (funcall (gnus-get-function gnus-command-method 'close-server)
+              (nth 1 gnus-command-method)
+              (nthcdr 2 gnus-command-method))
+    (when-let ((elem (assoc gnus-command-method gnus-opened-servers)))
+      (setf (nth 1 elem) 'closed))))
 
 (defun gnus-request-list (gnus-command-method)
   "Request the active file from GNUS-COMMAND-METHOD."