Don't let crypton-connection do name resolution#579
Conversation
Instead use the existing resolver.
|
@Yuras do you think it's possible to first do a small refactoring that extracts the
|
|
Not sure what exactly you mean, |
This looks like a useful contribution, so I hope there is a better outcome than "close the PR". That said:
|
|
Also, note that I was asking you a question. That means that I'm not even sure if this turns out nice. If I already know 100% that something is the right thing to do, then I will not phrase it as a question, but instead say "please do X". |
|
Looks like there is a misunderstanding here. I'm happy to refactor the PR if you explain what exactly you are expecting. But I genuinely don't understand what I should do. And since the changes are quite trivial, it's almost definitely be faster for you to do the changes than to explain it to me.
The comments are probably not necessary, I'm happy to drop them. It was just me being confused by the design of Anyway, I used I don't see any code duplication here. The |
OK, at least we sorted that out. That's the refactoring I had in mind #584. The second commit of https://github.com/snoyberg/http-client/compare/tls-no-resolve then introduces your change. |
It's less about deduplication, but more about making it easier to review, especially as I also don't have a way to test the proxy code path. |
|
Cool, thanks. Closing in favor to your branch. |
Instead use the existing resolver.
Fixes #569
and #544(EDIT: no, it doesn't), likely fixes commercialhaskell/stack#5994The problems is that
crypton-connectiontries addresses one by one, so if the fist address returned bygetaddrinfo(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-clienttries connections concurrently.I tested only
getTlsConnectionpart and notgetTlsProxyConnectionsince I don't actually have any proxy on hands. I let maintainer decide what to do next.