mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
specify timeouts
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@48 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
26e3a2fec3
commit
8c8184cd0e
1 changed files with 2 additions and 0 deletions
|
@ -53,6 +53,8 @@ public final class ParserUtils
|
|||
final URLConnection connection = new URL(url).openConnection();
|
||||
connection.setDoInput(true);
|
||||
connection.setDoOutput(request != null);
|
||||
connection.setConnectTimeout(5000);
|
||||
connection.setReadTimeout(5000);
|
||||
connection.addRequestProperty("User-Agent", SCRAPE_USER_AGENT);
|
||||
|
||||
if (request != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue