openvidu-server: MediaEndpoint candidates list synchronized

pull/469/head
pabloFuente 2020-05-14 18:31:11 +02:00
parent 54b20665f3
commit d5a97d2d66
1 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@
package io.openvidu.server.kurento.endpoint; package io.openvidu.server.kurento.endpoint;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
@ -92,8 +93,8 @@ public abstract class MediaEndpoint {
private MediaPipeline pipeline = null; private MediaPipeline pipeline = null;
private ListenerSubscription endpointSubscription = null; private ListenerSubscription endpointSubscription = null;
private final List<IceCandidate> receivedCandidateList = new ArrayList<IceCandidate>(); private final List<IceCandidate> receivedCandidateList = Collections.synchronizedList(new ArrayList<>());
private final List<IceCandidate> gatheredCandidateList = new ArrayList<IceCandidate>(); private final List<IceCandidate> gatheredCandidateList = Collections.synchronizedList(new ArrayList<>());
private LinkedList<IceCandidate> candidates = new LinkedList<IceCandidate>(); private LinkedList<IceCandidate> candidates = new LinkedList<IceCandidate>();
public String selectedLocalIceCandidate; public String selectedLocalIceCandidate;