[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

:nowait t misbehaves when falling back from IPv6 to IPv4

From: Robert Pluim
Subject: :nowait t misbehaves when falling back from IPv6 to IPv4
Date: Tue, 19 Feb 2019 20:29:13 +0100

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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]