unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* :nowait t misbehaves when falling back from IPv6 to IPv4
@ 2019-02-19 19:29 Robert Pluim
  2019-02-20 10:19 ` Robert Pluim
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2019-02-19 19:29 UTC (permalink / raw)
  To: emacs-devel

This requires you to be on a dual-stack IPv4/v6 host, with working
IPv6 connectivity.

elpa.gnu.org is currently reachable via IPv4, but not IPv6.

    ./emacs-26 -Q
    M-x package-list-packages

    <time passes>
    error in process filter: Error retrieving:
    https://elpa.gnu.org/packages/archive-contents (error http 400) [2
    times]

Looking at the network traces, Emacs tries to connect using IPv6,
which times out, and it then falls back to the IPv4
address. Unfortunately something goes wrong, and the connection fails.

If I change the 'open-network-stream' call in 'url-open-stream' to not
use :nowait t, then everything works (although you still have to wait
for the IPv6 connect to timeout).

emacs-27 is different, presumably because of
e87e6a24c49542111e669b7d0f1a412024663f8e : on macOS it never sees the
IPv6 connection time out, so never falls back, on GNU/Linux itʼs the
same as emacs-26.

I unfortunately donʼt have time to look into this right now, but
perhaps someone familiar with the network code has some ideas.

Robert



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-20 19:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-19 19:29 :nowait t misbehaves when falling back from IPv6 to IPv4 Robert Pluim
2019-02-20 10:19 ` Robert Pluim
2019-02-20 18:44   ` Robert Pluim
2019-02-20 19:24     ` Eli Zaretskii
2019-02-20 19:29       ` Robert Pluim
2019-02-20 19:44         ` Eli Zaretskii

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).