请问下,Asyhttpclient使用setTimeOut方法设置了超时,为啥还是会等很长时间才会响应onFailure的方法
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Look carefully at the documentation, check the code, and pay attention to the differences between the following methods
setTimeout(int value)
Set both the connection and socket timeouts. By default, both are set to 10 seconds.
setConnectTimeout(int value)
Returns current connection timeout limit (milliseconds). By default, this is set to 10 seconds.
setMaxRetriesAndTimeout(int retries, int timeout)
Sets the maximum number of retries and timeout for a particular Request.
It is best not to use this library, it is outdated, use okhttp/retrofit
Look carefully at the documentation, check the code, and pay attention to the differences between the following methods
Set both the connection and socket timeouts. By default, both are set to 10 seconds.
Returns current connection timeout limit (milliseconds). By default, this is set to 10 seconds.
Sets the maximum number of retries and timeout for a particular Request.
It is best not to use this library, it is outdated, use okhttp/retrofit