diff --git a/p2p/base/p2p_transport_channel.cc b/p2p/base/p2p_transport_channel.cc index 5d1b73f92b..62be347838 100644 --- a/p2p/base/p2p_transport_channel.cc +++ b/p2p/base/p2p_transport_channel.cc @@ -631,6 +631,10 @@ void P2PTransportChannel::SetIceConfig(const IceConfig& config) { << config.stun_keepalive_interval_or_default(); } + if (webrtc::field_trial::IsEnabled("WebRTC-ExtraICEPing")) { + RTC_LOG(LS_INFO) << "Set WebRTC-ExtraICEPing: Enabled"; + } + webrtc::BasicRegatheringController::Config regathering_config( config_.regather_all_networks_interval_range, config_.regather_on_failed_networks_interval_or_default()); diff --git a/p2p/base/port.cc b/p2p/base/port.cc index 238becbf7b..d6d402ef57 100644 --- a/p2p/base/port.cc +++ b/p2p/base/port.cc @@ -30,6 +30,7 @@ #include "rtc_base/numerics/safe_minmax.h" #include "rtc_base/string_encode.h" #include "rtc_base/third_party/base64/base64.h" +#include "system_wrappers/include/field_trial.h" namespace { @@ -1328,6 +1329,11 @@ void Connection::OnReadPacket(const char* data, void Connection::HandleBindingRequest(IceMessage* msg) { // This connection should now be receiving. ReceivedPing(); + if (webrtc::field_trial::IsEnabled("WebRTC-ExtraICEPing") && + last_ping_response_received_ == 0) { + RTC_LOG(LS_INFO) << ToString() << "WebRTC-ExtraICEPing/Sending extra ping"; + Ping(rtc::TimeMillis()); + } const rtc::SocketAddress& remote_addr = remote_candidate_.address(); const std::string& remote_ufrag = remote_candidate_.username();