Gnus development mailing list
 help / color / mirror / Atom feed
From: Elias Oltmanns <eo@nebensachen.de>
To: ding@gnus.org
Subject: Re: imap connections never being closed?
Date: Thu, 08 Aug 2013 23:08:18 +0200	[thread overview]
Message-ID: <874nazvqkd.fsf@denkblock.local> (raw)
In-Reply-To: <m3siyt8j5u.fsf@stories.gnus.org>

(2013-08-01) Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
> Steinar Bang <sb@dod.no> writes:
>> If the computer is put to sleep and/or moved to a different network,
>> open IMAP connections seems to be stuck.
> 
> Yes, but quitting Gnus kills off all the buffers Gnus has made, so all
> connections should be killed at that point.

At least on emacs 23.3.1, quitting gnus is not even possible in these
situations. My piece of advice is this:

(defadvice nnimap-close-server (around dont-ping)
  (let ((imap-ping-server nil))
    ad-do-it))

Since I cannot test ma gnus or emacs 24.3 right now, here is the
behaviour I'm seeing---that is, not any more:
1. Open gnus and an encrypted imap connection to some remote server.
2. Cutt off the connection to the internet (shut down wlan in my case).
3. Press `q' in the group buffer. Gnus will hang at that point. Pressing
   `C-g' unfreezes emacs but leaves me int he gorup buffer, i.e. gnus
   remains active. Alternatively, killing the gnutls-cli / openssl
   process from a terminal unfreezes emacs as well und actually shuts
   down gnus.

With the hack above, quitting gnus will still hang, but pressing `C-g'
won't return to the group buffer but complete shutdown instead. Also,
setting nnimap-logout-timeout works as expected now.

Of course, the tcp approach discussed elsewhere has a much wider scope,
as would have a generic timeout based solution. Still, I wonder whether
a simple patch to nnimap-close-server would be a start to spare at least
some users' nerves. That is, if the situation in emacs 24.3 is still as
annoying as described above.

Hope that helped a bit,

Elias




  reply	other threads:[~2013-08-08 21:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15 16:28 lee
2013-08-01 14:41 ` Lars Magne Ingebrigtsen
2013-08-01 16:13   ` Steinar Bang
2013-08-01 16:34     ` Lars Magne Ingebrigtsen
2013-08-08 21:08       ` Elias Oltmanns [this message]
2013-08-12 17:20         ` Lars Magne Ingebrigtsen
2013-08-02 18:53     ` Julien Danjou
2013-08-03 11:29       ` Lars Magne Ingebrigtsen
2013-08-03 13:13         ` Julien Danjou
2013-08-03 13:17           ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nazvqkd.fsf@denkblock.local \
    --to=eo@nebensachen.de \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).