Android Volley: Pros/Cons overriding DefaultRetryPolicy of Request

微笑、不失礼 提交于 2019-12-23 02:53:03

问题


By default Volley request timeout is set to 2500ms and it makes 1 retry per request.

I wonder if it's a good thing to override it, let's say request timeout is set to 5000ms and 2 retries per request?

What are the reasons default timeout is 'just' 2.5 sec? Why 'only one' retry? It seems not enough, but perhaps there are good reasons hiding common best practises.

I'm tuning to considerations in the level of http, networking, routing etc. (NOT Android UI/UX).

EDIT: Example - If I set the timeout to 5 sec, is it possible waste of time because in some http level if the connection is NOT OK so the average response time to know this is only 2 sec? What are these http details I need to consider while overriding DefaultRetryPolicy?

Thanks,

来源:https://stackoverflow.com/questions/32838724/android-volley-pros-cons-overriding-defaultretrypolicy-of-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!