summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2015-01-25 12:18:51 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2015-01-25 12:18:51 +0000
commitf67446455fc0ec59f5c25c90a8783e571b60dc8f (patch)
treeaef69cc5af4313887b8e1b7f2b52db0533d78d41
parent407e6beeb3c37947c7c92bf0d230973bf133afde (diff)
downloademacs-f67446455fc0ec59f5c25c90a8783e571b60dc8f.tar.gz
lisp/gnus/gnus-group.el (gnus-group-suspend): Close all backends
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/gnus-group.el5
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5a61a211661..08e904adf48 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-25 Lars Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-group.el (gnus-group-suspend): Close all backends.
+
2015-01-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nntp.el (nntp-send-authinfo): Error out if the password is wrong.
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index f3dcc40b8c4..dc11442656d 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4312,6 +4312,11 @@ The hook `gnus-suspend-gnus-hook' is called before actually suspending."
(gnus-kill-buffer buf)))
(setq gnus-backlog-articles nil)
(gnus-kill-gnus-frames)
+ ;; 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))
(when group-buf
(bury-buffer group-buf)
(delete-windows-on group-buf t))))