ITADN

Don't let crypton-connection resolve hostname

#585Pull Requestsol 创建于 2026-06-07
S
solcommented
Instead use the existing resolver. @Yuras said in #579: Fixes #569 <s>and #544</s> (EDIT: no, it doesn't), likely fixes https://github.com/commercialhaskell/stack/issues/5994 The problems is that `crypton-connection` tries addresses [one by one](https://github.com/kazu-yamamoto/crypton-connection/blob/1af72aad1733046195e6f0025adcb7944fa75dad/Network/Connection.hs#L243-L252), so if the fist address returned by `getaddrinfo(3)` is a misconfigured ipv6 address, it'll spend quite a bit of time trying to connect to ipv6 address, and only then try the next address. Note that `http-client` tries connections [concurrently](https://github.com/snoyberg/http-client/blob/5f0d14724af440e439ce5803b941911609e766e8/http-client/Network/HTTP/Client/Connection.hs#L218-L227). I tested only `getTlsConnection` part and not ` getTlsProxyConnection` since I don't actually have any proxy on hands. I let maintainer decide what to do next.
合并状态:未合并 4 条评论