Skip to content

Fix ConnectionPool deadlock from reentrant _optional_thread_lock - #1109

Open
aoright wants to merge 1 commit into
encode:masterfrom
aoright:fix-socks5-timeout
Open

Fix ConnectionPool deadlock from reentrant _optional_thread_lock#1109
aoright wants to merge 1 commit into
encode:masterfrom
aoright:fix-socks5-timeout

Conversation

@aoright

@aoright aoright commented Sep 11, 2026

Copy link
Copy Markdown

Fixes #1089.\n\nThe sync _init_socks5_connection was missing the timeout parameter and did not pass it down to stream.read/write, which caused infinite hangs during SOCKS5 proxy initialization.\n\nThis PR passes timeout from the kwargs parameter to _init_socks5_connection and ensures it is used when reading and writing to the SOCKS5 stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

_init_socks5_connection ignores timeout — SyncStream.read() puts socket into infinite blocking mode

1 participant