Added low timeout numbers to URLConnections

[artf412948]
This commit is contained in:
Ziver Koc 2014-09-16 16:34:00 +02:00
parent e00d1fcb62
commit 448e074fcb
3 changed files with 6 additions and 0 deletions

View file

@ -31,6 +31,8 @@ public class UeBehaviourFileDownload extends UeBehaviour {
byte[] data = new byte[BUFFER_SIZE];
URLConnection connection = url.openConnection();
connection.setConnectTimeout(5000);
connection.setReadTimeout(3000);
connection.setUseCaches(false);
connection.connect();
InputStream in = connection.getInputStream();

View file

@ -39,6 +39,8 @@ public class UeBehaviourFtpUpload extends UeBehaviour {
byte[] data = new byte[BUFFER_SIZE];
URLConnection connection = url.openConnection();
connection.setConnectTimeout(5000);
connection.setReadTimeout(3000);
connection.connect();
OutputStream out = connection.getOutputStream();

View file

@ -75,6 +75,8 @@ public class UeBehaviourSurfing extends UeBehaviour {
log.debug("Downloading: " + cont.url);
URLConnection connection = cont.url.openConnection();
connection.setConnectTimeout(5000);
connection.setReadTimeout(3000);
connection.setUseCaches(false);
connection.connect();
InputStream in = connection.getInputStream();