introduced http connection timeout

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngine@100357 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Gianpaolo Coro 2014-10-02 12:21:05 +00:00
parent 5c13a677ef
commit 866c99e47e
1 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,9 @@ public class HttpRequest {
}
URL url = new URL(urlStr);
URLConnection conn = url.openConnection();
conn.setConnectTimeout(120000);
conn.setReadTimeout(120000);
// Get the response
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
StringBuffer sb = new StringBuffer();