openvidu-server: set createdAt property of endpoints before ICE processing

pull/375/head
pabloFuente 2019-09-13 16:33:21 +02:00
parent 6e19337260
commit 439cf60798
2 changed files with 2 additions and 2 deletions

View File

@ -184,6 +184,7 @@ public class PublisherEndpoint extends MediaEndpoint {
} else { } else {
innerConnect(); innerConnect();
} }
this.createdAt = System.currentTimeMillis();
String sdpResponse = null; String sdpResponse = null;
switch (sdpType) { switch (sdpType) {
case ANSWER: case ANSWER:
@ -196,7 +197,6 @@ public class PublisherEndpoint extends MediaEndpoint {
throw new OpenViduException(Code.MEDIA_SDP_ERROR_CODE, "Sdp type not supported: " + sdpType); throw new OpenViduException(Code.MEDIA_SDP_ERROR_CODE, "Sdp type not supported: " + sdpType);
} }
gatherCandidates(); gatherCandidates();
this.createdAt = System.currentTimeMillis();
return sdpResponse; return sdpResponse;
} }

View File

@ -49,12 +49,12 @@ public class SubscriberEndpoint extends MediaEndpoint {
public synchronized String subscribe(String sdpOffer, PublisherEndpoint publisher) { public synchronized String subscribe(String sdpOffer, PublisherEndpoint publisher) {
registerOnIceCandidateEventListener(publisher.getOwner().getParticipantPublicId()); registerOnIceCandidateEventListener(publisher.getOwner().getParticipantPublicId());
this.createdAt = System.currentTimeMillis();
String sdpAnswer = processOffer(sdpOffer); String sdpAnswer = processOffer(sdpOffer);
gatherCandidates(); gatherCandidates();
publisher.connect(this.getEndpoint()); publisher.connect(this.getEndpoint());
setConnectedToPublisher(true); setConnectedToPublisher(true);
setPublisher(publisher); setPublisher(publisher);
this.createdAt = System.currentTimeMillis();
return sdpAnswer; return sdpAnswer;
} }