diff --git a/p2p/base/p2ptransportchannel.cc b/p2p/base/p2ptransportchannel.cc index 414ff2b764..b728334780 100644 --- a/p2p/base/p2ptransportchannel.cc +++ b/p2p/base/p2ptransportchannel.cc @@ -536,6 +536,7 @@ void P2PTransportChannel::SetIceConfig(const IceConfig& config) { if (config_.network_preference != config.network_preference) { config_.network_preference = config.network_preference; + RequestSortAndStateUpdate(); RTC_LOG(LS_INFO) << "Set network preference to " << (config_.network_preference.has_value() ? config_.network_preference.value() diff --git a/p2p/base/port.h b/p2p/base/port.h index 16fedb8148..ee5fa65b69 100644 --- a/p2p/base/port.h +++ b/p2p/base/port.h @@ -106,7 +106,7 @@ enum class IceCandidatePairState { // frozen because we have not implemented ICE freezing logic. }; -// Stats that we can return about the port of a connection. +// Stats that we can return about the port of a STUN candidate. class StunStats { public: StunStats() = default; diff --git a/p2p/base/stunport.cc b/p2p/base/stunport.cc index 3ea1f96a7f..9871e4fb61 100644 --- a/p2p/base/stunport.cc +++ b/p2p/base/stunport.cc @@ -322,7 +322,7 @@ void UDPPort::GetStunStats(rtc::Optional* stats) { } void UDPPort::set_stun_keepalive_delay(const rtc::Optional& delay) { - stun_keepalive_delay_ = (delay.has_value() ? delay.value() : KEEPALIVE_DELAY); + stun_keepalive_delay_ = delay.value_or(KEEPALIVE_DELAY); } void UDPPort::OnLocalAddressReady(rtc::AsyncPacketSocket* socket,