I do not believe that UrlConnection is behaving optimally. What are the best practices for use of timeouts and retries?
IE Short timeout but many retries. Long timeout - no retries Short Timeout, then retry with longer timeout. Some actual numbers to start with. Whether readtimeout and connecttimeout should be different. Etc. You may be tempted to say"well, that depends on your use case and how fast your server responds." I have no control over the servers or where the end users access them from, so assume "all over the map". As for use case, I am downloading lots of small files (ie 20k) using a threadpool. Long timeouts will tie up the threadpool if the download is just going to fail anyway. I found this from Tim Bray. https://www.tbray.org/ongoing/When/201x/2012/01/17/HttpURLConnection But the real life example code he referred to is no longer there. Nathan -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/6f7b951a-30c3-4e4d-bfdf-d9a32061659f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

