[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transparently reconnect to servers after a system suspend

From: Eric Abrahamsen
Subject: Re: Transparently reconnect to servers after a system suspend
Date: Sat, 15 Oct 2016 10:46:37 -0700
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26.0.50 (gnu/linux)

Sebastian Krause <> writes:

> Hi,
> I have one IMAP and two NNTP servers configured in Gnus, all over
> SSL using the integrated GnuTLS. When I put my laptop into
> suspend-to-RAM for a while, the TCP connections will obviously drop
> eventually, but Gnus doesn't recognize this, so pressing 'g' after
> the system wake-up will cause Gnus to hang waiting for the TCP
> connections to respond. I usually resolve that by restarting Gnus
> with 'C-g' and 'R'.
> Is there a way for Gnus to quickly detect dropped TCP connections
> and transparently reconnect when I try to update the group list?

This has been annoying people for a very long time, but I don't think
there's any clean solution to the problem. Gnus doesn't actually know
that you've suspended and woken your computer, so it doesn't have any
reason to suspect the connections are down. I think we'd have to ping
servers on a timer, or maybe run a clock in lisp and periodically check
it against system time (to see if execution was suspended for a while).
Nothing immediately presents itself as The Right Solution, so no one's
done anything...

A lighter-weight solution than a full restart is using "z", for
gnus-group-suspend. That will close all the servers, which will be
re-opened the next time you "g". In fact, all you really need is:

(dolist (elem gnus-opened-servers)
  (gnus-close-server (car elem))
  (setcar (cdr elem) 'closed))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]