httpcore icon indicating copy to clipboard operation
httpcore copied to clipboard

Socks proxy should support read/write timeouts

Open Anthonybelui opened this issue 1 year ago • 1 comments

Discussed in https://github.com/encode/httpcore/discussions/859

Originally posted by Anthonybelui December 16, 2023 Hello, thanks for developing the library. I wanted to ask you to fix/define the logic for the read timeout in socks_proxy. This creates an infinity reading.

File httpcore/_sync/socks_proxy.py Function _init_socks5_connection() Line: incoming_bytes = stream.read(max_bytes=4096) > incoming_bytes = stream.read(max_bytes=4096, timeout=SomeTimeout)

Anthonybelui avatar Dec 22 '23 15:12 Anthonybelui