From 142348fcef88e48778ce78320f44fcfbcd475db2 Mon Sep 17 00:00:00 2001 From: Juan Navarro Date: Fri, 5 Nov 2021 15:50:39 +0100 Subject: [PATCH] openvidu-server: gatherCandidates() returns immediately, no need for async --- .../server/kurento/endpoint/MediaEndpoint.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java b/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java index 76b50dfa..5b36ecea 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java +++ b/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java @@ -649,17 +649,8 @@ public abstract class MediaEndpoint { throw new OpenViduException(Code.MEDIA_WEBRTC_ENDPOINT_ERROR_CODE, "Can't start gathering ICE candidates on null WebRtcEndpoint (ep: " + endpointName + ")"); } - webEndpoint.gatherCandidates(new Continuation() { - @Override - 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); - } - }); + webEndpoint.gatherCandidates(); + log.trace("EP {}: Internal endpoint started to gather candidates", endpointName); } private void internalAddIceCandidate(IceCandidate candidate) throws OpenViduException {