提交 2194f597 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

RTCPeerConnection: don't abort if rtpSender.setTransport() fails (fixes #88)

上级 6ecc3ebe
...@@ -79,6 +79,12 @@ class RTCPeerConnectionPlanB extends RTCPeerConnectionCommon ...@@ -79,6 +79,12 @@ class RTCPeerConnectionPlanB extends RTCPeerConnectionCommon
// Try to renegotiate. // Try to renegotiate.
this._mayRenegotiate(); this._mayRenegotiate();
}); });
})
.catch((error) =>
{
// It may happen that, at this point, the RtpSender was internally
// closed, so don't abort everythin due to this.
this._logger.error(`rtpSender.setTransport() failed: ${error}`);
}); });
promises.push(promise); promises.push(promise);
......
...@@ -123,6 +123,12 @@ class RTCPeerConnectionUnifiedPlan extends RTCPeerConnectionCommon ...@@ -123,6 +123,12 @@ class RTCPeerConnectionUnifiedPlan extends RTCPeerConnectionCommon
// Store in the map. // Store in the map.
this._mapTransceivers.set(mid, transceiver); this._mapTransceivers.set(mid, transceiver);
})
.catch((error) =>
{
// It may happen that, at this point, the RtpSender was internally
// closed, so don't abort everythin due to this.
this._logger.error(`rtpSender.setTransport() failed: ${error}`);
}); });
promises.push(promise); promises.push(promise);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论