mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-24 04:52:05 +01:00
Change return value of connectToCandidates
This commit is contained in:
parent
19d334d6bb
commit
a77360d060
1 changed files with 6 additions and 2 deletions
|
@ -100,14 +100,18 @@ public class JingleS5BTransport extends Transport<JingleS5BTransportElement> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void connectToCandidates(int timeout) {
|
public JingleS5BTransportCandidate connectToCandidates(int timeout) {
|
||||||
for (TransportCandidate c : getCandidates()) {
|
for (TransportCandidate c : getCandidates()) {
|
||||||
|
int _timeout = timeout / getCandidates().size(); //TODO: Wise?
|
||||||
try {
|
try {
|
||||||
selectedCandidate = ((JingleS5BTransportCandidate) c).connect(timeout / getCandidates().size()); //TODO: Wise?
|
return ((JingleS5BTransportCandidate) c).connect(_timeout);
|
||||||
} catch (IOException | TimeoutException | InterruptedException | SmackException | XMPPException e) {
|
} catch (IOException | TimeoutException | InterruptedException | SmackException | XMPPException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Failed to connect to any candidate.
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue