req.setRetryPolicy(new DefaultRetryPolicy(
MY_SOCKET_TIMEOUT_MS,
DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
You can set MY_SOCKET_TIMEOUT_MS
as 100. Whatever you want to set this to is in milliseconds. DEFAULT_MAX_RETRIES
can be 0 default is 1.