-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket Timeout Exception #29
Comments
Its becoz either your internet connection is slow or your file server taking time to respond.
When you put these line you are actually setting file read time out for the connection so if the read responce doesn't come in 1 sec this will throw time out exception. Please check your connection speed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
URL url = new URL(task.url);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setConnectTimeout(1000);
connection.setReadTimeout(1000);
in AsyncWorker.class having above code throws socket time out exception
and download stops after few moments
whenever i made below changes in above code it works well sometimes and after sometime again facing same problem
URL url = new URL(task.url);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setConnectTimeout(60000);
connection.setReadTimeout(60000);
Using MotoG3 for testing device android MarshMallow 6.0.1
The text was updated successfully, but these errors were encountered: