From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jimmy Yuen Ho Wong Newsgroups: gmane.emacs.devel Subject: Re: [RFC] automatically retrying network connections Date: Sat, 21 Jul 2018 16:21:12 +0100 Message-ID: References: <87sh4dfz8r.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532186410 13953 195.159.176.226 (21 Jul 2018 15:20:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Jul 2018 15:20:10 +0000 (UTC) To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 21 17:20:06 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgtfx-0003X3-2q for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2018 17:20:05 +0200 Original-Received: from localhost ([::1]:52816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgti3-0004Xn-U5 for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2018 11:22:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgthP-0004Xh-HK for emacs-devel@gnu.org; Sat, 21 Jul 2018 11:21:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgthO-00068G-He for emacs-devel@gnu.org; Sat, 21 Jul 2018 11:21:35 -0400 Original-Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:34066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgthO-00067i-C7 for emacs-devel@gnu.org; Sat, 21 Jul 2018 11:21:34 -0400 Original-Received: by mail-io0-x22e.google.com with SMTP id l7-v6so12235698ioj.1 for ; Sat, 21 Jul 2018 08:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=rpI5GjRLCRRNQli5KRu0s+jh7o/Ec7G2PCscZplEY2E=; b=o608zMsCsFxYaGITIjeNp1lLNeVWs2k9VURYv0MOfrxjaVyUQICXHiAoyN0nHtyabh +jQd/B9VG8FqH8m5WMzwCmH2sHZwkayd6fyeV98wEUUxNC21dVuq1TfBtN6xzKLxupjD DAqkQUjSFZh/APRrzgY4JCAE8QevDBkdhDwzV++aknowqCwigqdm2G4n5a5Nh5kWLVVs 4kTa2R1T9ZiJvpeiI90mZjYu3eeNScbi4gM+52L7cJzoCcTHlPDgnIBCAiL4itI8x8VP A1LHQcLhpWVHH5J0GaFkKu4BDV8HBUeExbiq3Sqjv3Mk5Wq2MK7wUwPfmwQz92VQlmzV kAUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=rpI5GjRLCRRNQli5KRu0s+jh7o/Ec7G2PCscZplEY2E=; b=BhBhSILXLocdHwO11xDHQQKzIvRvlshUjSEn7OPSaRnZRfZNB+/nnVfXEbGe8pkQVN GvT7ut4C/0VLJse7r2kRp0L1jIGYMRCM6Rn8GsbbvWeAbDN2mH/a0sm4niSVbb9PWgVq 2cgG9KnlQLxq+WZ2Ae1wLzu1amkVIKqqje56ehbPP9gCfRul/tIWAJKvpLsUiiKRHFRi T4ew/H23HD8l7sQS22NyLn8TYC1dAKY9uRniPTJe0fKzVeCDIcDIqoaDbznwEOCbZ6BA WDlxOKtZH9sj1EFzO2PDk/rnkpC6LAfqURItkt6vK+j9RCI9LUwnvOfZoU9SGNIC7fO0 NT3w== X-Gm-Message-State: AOUpUlGn3X+1T12YqSe75nqlIOsNWtOJRymdjIyyG/UXgaY/7zKYdHKi D2NA+ddcBEUSI269GxmTRL3w78UsERy3paIZxmh4PScX X-Google-Smtp-Source: AAOMgpeKL0mF0AW2DfnqVkI2qdew8nd/RlvhonLqdm6spfMPfduJbZPS9bcMNZs4hdd2DjyCzBDac+8EsN+ihHChfUM= X-Received: by 2002:a6b:c5c6:: with SMTP id v189-v6mr4850339iof.167.1532186493286; Sat, 21 Jul 2018 08:21:33 -0700 (PDT) Original-Received: by 2002:a02:985d:0:0:0:0:0 with HTTP; Sat, 21 Jul 2018 08:21:12 -0700 (PDT) In-Reply-To: <87sh4dfz8r.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227621 Archived-At: On Fri, Jul 20, 2018 at 9:06 PM, Robert Pluim wrote: > Hi, > > one of the consequences of asking the user questions during network > connection setup is that the server they're trying to connect to might > have decided to close the connection by the time they've finished > answering. > > This suggests that there should be an option to retry the connection > in such a situation. I have a trial implementation involving a new > parameter to open-network-stream to request retrying, but was > wondering if it might not be better if it was a globally enabled > default. I=CA=BCll note that various browsers retry failing connections > automatically. > > Thanks > > Robert > I have a related but different issue, and I think I'm looking at a different solution from an option that automatically retries at layer 4. The OCSP RFC I'm implementing specifies a response status type `tryLater`, this is on layer 7. What I really need is some kind of promise/future primitive or await async built into Emacs so I don't have to block the other OCSP requests that I need to make while I'm waiting for a good answer for this one, or worse, block the UI. I'm currently using generators to alleviate UI blocking a bit, but I haven't found a good answer to making async network processes and then joining their results later. (short of writing a giant block of callback spagetti anyway...) P.S. Thanks a lot for exposing `getaddrinfo`, I haven't tried it out yet. I'll get it ASAP.