From: Ken Brown <kbrown@cornell.edu>
To: Fran <flitterio@gmail.com>
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>, 23658@debbugs.gnu.org
Subject: bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows
Date: Wed, 1 Jun 2016 17:55:18 -0400 [thread overview]
Message-ID: <778c3c88-8eb0-d54c-e00a-84165f5c63b5@cornell.edu> (raw)
In-Reply-To: <CAGQpP8QCJw=ma=ps_qr=5STeKoXgxCgDKc9vzfAVSAtVo8+Gyg@mail.gmail.com>
On 6/1/2016 3:57 PM, Fran wrote:
> Removing the ":nowait t" makes it connect successfully to the IPv6
> address. In that case, it works regardless of whether ":family 'ipv6"
> is present. If this were my personal code that would be a sufficient
> workaround, but I found this bug in ERC (the Emacs IRC client), and I
> think it is designed so that make-network-process has to connect
> asynchronously.
This sounds similar to the situation I faced in bug#23606. (But in that
case specifying :family solved the problem). Here's what I suspect is
happening:
In src/process.c there's a loop starting at line 3138 in which the code
runs through a list of possible addrinfo structures in the hopes of
finding one it can connect to. In the asynchronous case, it doesn't
wait to see if the connection is successful; this is only discovered
later (around line 5495). At this point it's too late to try another
addrinfo structure, and a "failed" message is generated (line 5523) if
the connection didn't succeed.
I think it would be better if the loop would delay making the connection
asynchronous (line 3160 or 3171) until it's known that the connection
has succeeded.
Lars, is there any reason not to do it that way?
Ken
next prev parent reply other threads:[~2016-06-01 21:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 23:44 bug#23658: 25.1.50; make-network-connection fails to connect to IPv6 address on Windows Francis Litterio
2016-06-01 14:54 ` Ken Brown
2016-06-01 15:30 ` Fran
2016-06-01 16:29 ` Ken Brown
2016-06-01 19:57 ` Fran
2016-06-01 21:55 ` Ken Brown [this message]
2016-06-02 14:50 ` Ken Brown
2016-06-04 16:01 ` Fran Litterio
2016-06-05 15:04 ` Fran Litterio
2016-06-05 15:31 ` Ken Brown
2016-06-05 15:52 ` Fran
2016-06-05 16:56 ` Fran
2016-06-05 17:20 ` Ken Brown
2016-06-05 18:00 ` Ken Brown
2016-06-12 20:04 ` Ken Brown
2016-06-12 23:24 ` Ken Brown
2016-06-02 8:16 ` Live System User
2016-06-02 15:01 ` Ken Brown
2020-08-04 9:34 ` Lars Ingebrigtsen
2020-09-14 15:00 ` Lars 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=778c3c88-8eb0-d54c-e00a-84165f5c63b5@cornell.edu \
--to=kbrown@cornell.edu \
--cc=23658@debbugs.gnu.org \
--cc=flitterio@gmail.com \
--cc=larsi@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).