openvidu-server: add IceCandidates only after webEndpoint is available

pull/457/head
pabloFuente 2020-04-30 14:01:55 +02:00
parent bd262257f0
commit a922b95d95
1 changed files with 9 additions and 4 deletions

View File

@ -214,12 +214,12 @@ public abstract class MediaEndpoint {
internalEndpointInitialization(endpointLatch);
} else {
endpointLatch.countDown();
}
if (this.isWeb()) {
while (!candidates.isEmpty()) {
internalAddIceCandidate(candidates.removeFirst());
}
}
}
return old;
}
@ -291,6 +291,11 @@ public abstract class MediaEndpoint {
}
endpointLatch.countDown();
while (!candidates.isEmpty()) {
internalAddIceCandidate(candidates.removeFirst());
}
log.trace("EP {}: Created a new WebRtcEndpoint", endpointName);
endpointSubscription = registerElemErrListener(webEndpoint);