-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout does not affect socket connect call #64
Comments
Note that in trio this is super easy to fix since I can just wrap my request within my own trio.fail_after`. |
I'm thinking maybe modify the |
Things like this are funny. On one hand, it's trivial to implement, and on the other hand we need to have it behave in a way that is obvious, logical, and intuitive. I initially intentionally left the connection out of the timeout management, as I think it's not actually really expected to include it on a high level. For example, calling something that takes a defined about of time. Easy example is httpbin's /delay endpoint. Even as it stands now, thanks to network io, if we call /delay/1 with a timeout of 1, it will timeout every single time. This isn't really black magic stuff though. Users know that network io is at play and can account for that. So for /delay/1 a timeout of 1.5 seconds may be reasonable for them, and set. What is less obvious though, is that different servers have different concurrency capabilities and different Ideally I'd like to avoid complexity, but I think in the end it may make sense to have an additional How about a default of 60 seconds, half the the maximum (segment lifetime) time a packet can float around the interwebs? |
I'm not working on it! I just wanted to mention this because I ran into it, but for me, the trio timeout works fine for now. |
From requests:
and then from urllib3:
So what @theelous3 said... |
I have a need for this as well. Let me know if there's anything I can do to help. |
Fixed, pypi'd. ced7a74 |
asks/asks/sessions.py
Line 141 in 2028482
This line can hang, when connecting to a non-routable address (try 10.255.255.1 for example). It is not affected by the timeout argument.
The text was updated successfully, but these errors were encountered: