mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32:06 +01:00
Delays Tunning
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7481 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
9f3842bb8c
commit
deab89d251
2 changed files with 5 additions and 6 deletions
|
@ -302,7 +302,7 @@ public class ICECandidate extends TransportCandidate implements Comparable {
|
|||
for (int i = 0; i < 10 && !result.isReachable(); i++)
|
||||
try {
|
||||
System.err.println(i);
|
||||
Thread.sleep(300);
|
||||
Thread.sleep(400);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -661,7 +661,8 @@ public abstract class TransportCandidate {
|
|||
List<ResultListener> resultListeners = new ArrayList<ResultListener>();
|
||||
boolean enabled = true;
|
||||
boolean ended = false;
|
||||
long tries = 2;
|
||||
long replyTries = 2;
|
||||
long tries = 10;
|
||||
TransportCandidate candidate = null;
|
||||
|
||||
public CandidateEcho(TransportCandidate candidate, JingleSession session) throws UnknownHostException, SocketException {
|
||||
|
@ -718,9 +719,7 @@ public abstract class TransportCandidate {
|
|||
if (accept) break;
|
||||
}
|
||||
|
||||
long delay = 200 / tries / 2;
|
||||
|
||||
if (delay < 0) delay = 10;
|
||||
long delay = 100 / replyTries;
|
||||
|
||||
String str[] = new String(packet.getData(), "UTF-8").split(";");
|
||||
String pass = str[0];
|
||||
|
@ -743,7 +742,7 @@ public abstract class TransportCandidate {
|
|||
packet.setAddress(InetAddress.getByName(ip));
|
||||
packet.setPort(Integer.parseInt(port));
|
||||
|
||||
for (int i = 0; i < tries; i++) {
|
||||
for (int i = 0; i < replyTries; i++) {
|
||||
socket.send(packet);
|
||||
if (!enabled) break;
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue