HoneyryderChuck/httpx

Hanging connection for non-existent unix socket

airled opened this issue · 2 comments

Hello there. I have httpx version 0.22.2
Seems like the library has a bug. If you try to send a request to a non-existent unix socket it just hangs. No errors, no timeouts, no nothing.
Reproduce in IRB:

HTTPX.post('http://blabla', json: {}, transport: 'unix', addresses: 'blabla.sock')

Also no luck if I try to add a timeout parameter:

HTTPX.with(timeout: {total_timeout: 1}).post('http://blabla', json: {}, transport: 'unix', addresses: 'blabla.sock')

Can you please provide me how can I fix it? Thanks in advance.

thx for the report, I'm submitted this patch. Feel free to verify it. Until it gets released, just make sure that the socket path is valid before calling it.

thx for the report, I'm submitted this patch. Feel free to verify it. Until it gets released, just make sure that the socket path is valid before calling it.

OK. Thank you so much! Will wait for a fix.