Added low timeout numbers to URLConnections
[artf412948]
This commit is contained in:
parent
e00d1fcb62
commit
448e074fcb
3 changed files with 6 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue