Closed ayanko closed 3 years ago
That's reasonable.
However, you should only use timeouts if you need it. Persistent connections will already detect and reconnect if needed. It shouldn't be a user facing issue in most cases. If the underlying TCP connection is still valid, you shouldn't need a timeout on the response.read
operation. Otherwise, if the response is 1GB, it will surely timeout.
Let me know if you have more questions, but using with_timeout
is the correct way. I would suggest putting it around reading each chunk from the body.
But is with_timeout block async one?
Yes.
This is interesting lib but I have few questions :)
I could do it with
But it is probably not correct...