Add timeout for Http request
This commit is contained in:
parent
a777c89ef6
commit
e3140573ac
@ -83,6 +83,8 @@ public class HttpDownloader extends Downloader {
|
||||
} else {
|
||||
connection = (HttpURLConnection) sourceUrl.openConnection();
|
||||
}
|
||||
connection.setConnectTimeout(10000);
|
||||
connection.setReadTimeout(40000);
|
||||
}
|
||||
|
||||
protected void doDownload() throws IOException, InterruptedException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user