How does Android Volley handle temporarily loss of network connection?

后端 未结 5 1792
野趣味
野趣味 2021-02-08 14:27

If an Android Volley post request fails due to network loss, will Android Volley retry the post after the network connection is restored automatically? Will it fire all of the r

5条回答
  •  深忆病人
    2021-02-08 14:44

    In case an IOException appears (e.g. java.net.ConnectException), Volley does not use the retry policy. Volley uses only the retry policy in case of SocketTimeoutException, ConnectTimeoutException or if the HTTP response code is 401 (forbidden) or 302 (moved permanently).

提交回复
热议问题