Bug 1290049 - only process ice connection state change if new state differs from old state. r=bwc

MozReview-Commit-ID: KAM1XVIn4Qw

--HG--
extra : rebase_source : 18244caa318b8bccd969cd50069265b467477f26
This commit is contained in:
Michael Froman 2016-10-11 22:14:23 -05:00
Родитель 224b21b060
Коммит f9a7f32bd9
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -3417,6 +3417,11 @@ void PeerConnectionImpl::IceConnectionStateChange(
CSFLogDebug(logTag, "%s", __FUNCTION__);
auto domState = toDomIceConnectionState(state);
if (domState == mIceConnectionState) {
// no work to be done since the states are the same.
// this can happen during ICE rollback situations.
return;
}
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
if (!isDone(mIceConnectionState) && isDone(domState)) {