Sam YC
Sam YC

Reputation: 11617

How to change Volley read timeout?

I have read through how to setup customised retry policy in Volley, but if not wrong, the timeout is for both connection timeout and read timeout.

I want to have more tolerant timeout for read/send compare to handshake connection, because the HTTP response is rather huge in my case, I don't want to retry the HTTP connection so frequently all over again if read/send is timeout, but I am ok to have short handshake connection timeout.

How can I change that in Volley?

Upvotes: 0

Views: 390

Answers (1)

saiRam89
saiRam89

Reputation: 375

request.setRetryPolicy((new DefaultRetryPolicy( 10000(MY_SOCKET_TIMEOUT_MS), DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)));

Upvotes: 1

Related Questions