synchronize renegotiate to avoid race condition when that fails
This commit is contained in:
parent
359b2150eb
commit
a46246c423
|
@ -2482,7 +2482,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
||||||
this.webRTCWrapper.execute(this::renegotiate);
|
this.webRTCWrapper.execute(this::renegotiate);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renegotiate() {
|
private synchronized void renegotiate() {
|
||||||
final SessionDescription sessionDescription;
|
final SessionDescription sessionDescription;
|
||||||
try {
|
try {
|
||||||
sessionDescription = setLocalSessionDescription();
|
sessionDescription = setLocalSessionDescription();
|
||||||
|
@ -2531,11 +2531,12 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
||||||
+ this.webRTCWrapper.getSignalingState());
|
+ this.webRTCWrapper.getSignalingState());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (diff.added.size() > 0) {
|
if (diff.added.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
modifyLocalContentMap(rtpContentMap);
|
modifyLocalContentMap(rtpContentMap);
|
||||||
sendContentAdd(rtpContentMap, diff.added);
|
sendContentAdd(rtpContentMap, diff.added);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void initiateIceRestart(final RtpContentMap rtpContentMap) {
|
private void initiateIceRestart(final RtpContentMap rtpContentMap) {
|
||||||
final RtpContentMap transportInfo = rtpContentMap.transportInfo();
|
final RtpContentMap transportInfo = rtpContentMap.transportInfo();
|
||||||
|
|
Loading…
Reference in a new issue