From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 29903 invoked from network); 5 May 2020 08:20:20 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 5 May 2020 08:20:20 -0000 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.3) (envelope-from ) id 1jVso4-0006ew-ED; Tue, 05 May 2020 03:20:00 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jVso0-0006cF-6m for ding@lists.math.uh.edu; Tue, 05 May 2020 03:19:56 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jVsnb-0005Ft-6n for ding@lists.math.uh.edu; Tue, 05 May 2020 03:19:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FhHjdk702tNfRkxg/5+lNg4ivlfJ7fxt6Ec55zJXG74=; b=KKgjR+Yh3OT3m5hwVKNnFAVHOj JP0IFp/OK7LDOb3FDpXZYars7RRNh//2khP8fRf52aeen25xYCAJ1h2cZ3G2RWhhEsOgcuDhFujIc knoQJD2EnexBGzXGKaKn8cUER+GYeCuCWCiNHRfZLJ9kFeZjlnrlJKRZKRrWEhV5jcpk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVsnT-0003fc-8Q; Tue, 05 May 2020 10:19:26 +0200 From: Lars Ingebrigtsen To: Robert Pluim Cc: Eric Abrahamsen , Christian Barthel , ding@gnus.org Subject: Re: new wifi connection = nntp timeout = Emacs restart?, Re: new wifi connection = nntp timeout = Emacs restart? References: <87sgh3coxn.fsf@ericabrahamsen.net> <87pnbjwy5y.fsf@gnus.org> <874ksvodwm.fsf@ericabrahamsen.net> <87sgh3coxn.fsf@ericabrahamsen.net> <87o8rogew7.fsf@barthel.ch> <87zhb7mlf0.fsf@ericabrahamsen.net> <87a72t35ng.fsf@gnus.org> <87wo5wev3m.fsf@ericabrahamsen.net> <878sic1w65.fsf@gnus.org> <87y2qcbp45.fsf@ericabrahamsen.net> <87pnbjwy5y.fsf@gnus.org> <874ksvodwm.fsf@ericabrahamsen.net> <87eerzwpdo.fsf@gnus.org> Date: Tue, 05 May 2020 10:19:22 +0200 In-Reply-To: (Robert Pluim's message of "Tue, 05 May 2020 09:41:35 +0200") Message-ID: <87sggevlo5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk Robert Pluim writes: > That could work. 1 ping with a 500ms timeout? Or do we need 2 for > those firewalls that will drop the first one? > > Would adding something like > > (unless (gnutls-ping (get-buffer-process (nnimap-buffer))) > (delete-process (get-buffer-process (nnimap-buffer)))) > > to nnimap-send-command be enough? I was thinking more of an async interface. gnutls-ping would return immediately, but return a status variable that would evaluate to nil (as in "not gotten a pong"), that would change (asynchronously) to t when the TLS layer got a response. And then use that in the loop where we're waiting for a response on the IMAP command. That would mean that we introduce no extra latency for the commands, but send then before we know whether the connection is still up. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no