-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
readTimeout and connectTimeout have no affect if server does return HTTP headers #49
Comments
Hi @rymsha, can you provide a test case? readTimeout should complete the request exceptionally if a read couldn't be fulfilled within the timeout (e.g. a read() from an InputStream, etc.). That's only possible after the headers are received. Otherwise, readTimeout won't have the chance to schedule any timeouts. If the server establishes a connection but never finishes sending the headers, neither readTimeout nor connectTimeout can do much. If that's your case, have you tried setting a request timeout? |
Here is an example. okhttp3 mock server is used simulate such conditions
|
Maybe it is possible to implement a similar functionality as for |
I see. I got what you mean about |
Great that you found time to make this! |
Should be able to finally cut the |
When server establishes a socket connection, but never sends anything back HttpCleint gets stuck
I don't think it is a Methanol issue itself, but maybe at can be fixed with a little help from Methanol ?
The text was updated successfully, but these errors were encountered: