benoitc / hackney

simple HTTP client in Erlang
Other
1.34k stars 427 forks source link

Fixed slow unix domain socket requests #691

Closed dparnell closed 2 years ago

dparnell commented 3 years ago

Hi,

I have been using HTTPoison and by extension hackney in a project and found that when making requests to a Unix domain socket sometimes it would be excruciatingly slow. I finally had some time to track it down and discovered that hackney was doing a DNS lookup on the domain socket path which of course would always fail, but sometimes take a long time to do so. This little patch fixes this problem.

Thankyou so much for making hackney :)

Daniel

benoitc commented 2 years ago

thanks for the patch! merged.