FlorianREGAZ / Python-Tls-Client

Advanced HTTP Library
MIT License
660 stars 136 forks source link

Timeout sometimes not working #124

Open AnasBoujamaa opened 2 months ago

AnasBoujamaa commented 2 months ago

Hello, I'm using your library in a script where I use also the threading library for multi-threading. When doing requests setting a 10 seconds timeout argument, sometimes it's possible that it doesn't work, producing errors like failed to do request: Post "https://www.example.com": EOF (Client.Timeout exceeded while awaiting headers) 10 minutes after starting.

Edit: I noticed that this happens when I use residential proxies whether using multi-threading or not. Sometimes those proxies are trash and when that happens sometimes the timeouts don't work for some reason and they get activated a lot of time later than expected. Using the library requests, the timeout gets activated and I get this error: HTTPSConnectionPool(host='www.example.com', port=443): Max retries exceeded with url: /example/page (Caused by ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:990: The handshake operation timed out')))