openvidu-server: gatherCandidates() returns immediately, no need for async

pull/669/head
Juan Navarro 2021-11-05 15:50:39 +01:00
parent aba3311076
commit 142348fcef
1 changed files with 2 additions and 11 deletions

View File

@ -649,17 +649,8 @@ public abstract class MediaEndpoint {
throw new OpenViduException(Code.MEDIA_WEBRTC_ENDPOINT_ERROR_CODE, throw new OpenViduException(Code.MEDIA_WEBRTC_ENDPOINT_ERROR_CODE,
"Can't start gathering ICE candidates on null WebRtcEndpoint (ep: " + endpointName + ")"); "Can't start gathering ICE candidates on null WebRtcEndpoint (ep: " + endpointName + ")");
} }
webEndpoint.gatherCandidates(new Continuation<Void>() { webEndpoint.gatherCandidates();
@Override log.trace("EP {}: Internal endpoint started to gather candidates", endpointName);
public void onSuccess(Void result) throws Exception {
log.trace("EP {}: Internal endpoint started to gather candidates", endpointName);
}
@Override
public void onError(Throwable cause) throws Exception {
log.warn("EP {}: Internal endpoint failed to start gathering candidates", endpointName, cause);
}
});
} }
private void internalAddIceCandidate(IceCandidate candidate) throws OpenViduException { private void internalAddIceCandidate(IceCandidate candidate) throws OpenViduException {