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

View File

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