From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83698 Path: news.gmane.org!not-for-mail From: Elias Oltmanns Newsgroups: gmane.emacs.gnus.general Subject: Re: imap connections never being closed? Date: Thu, 08 Aug 2013 23:08:18 +0200 Message-ID: <874nazvqkd.fsf@denkblock.local> References: <87ppvn5oem.fsf@yun.yagibdah.de> <87d2px8k49.fsf@dod.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1375996436 5446 80.91.229.3 (8 Aug 2013 21:13:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2013 21:13:56 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M31954@lists.math.uh.edu Thu Aug 08 23:13:57 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V7XWu-0000DL-Cx for ding-account@gmane.org; Thu, 08 Aug 2013 23:13:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1V7XWW-0005hy-HJ; Thu, 08 Aug 2013 16:13:32 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1V7XRk-0005g5-0r for ding@lists.math.uh.edu; Thu, 08 Aug 2013 16:08:36 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1V7XRf-000701-7e for ding@lists.math.uh.edu; Thu, 08 Aug 2013 16:08:35 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1V7XRd-0004qU-TJ for ding@gnus.org; Thu, 08 Aug 2013 23:08:29 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V7XRd-0004BR-Pm for ding@gnus.org; Thu, 08 Aug 2013 23:08:29 +0200 Original-Received: from xdsl-89-0-170-139.netcologne.de ([89.0.170.139]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Aug 2013 23:08:29 +0200 Original-Received: from eo by xdsl-89-0-170-139.netcologne.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Aug 2013 23:08:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: xdsl-89-0-170-139.netcologne.de User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:AFG9lPPHeoBfsyVpSQLrnwj/9eg= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83698 Archived-At: (2013-08-01) Lars Magne Ingebrigtsen wrote: > Steinar Bang 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