| Index: webrtc/p2p/base/transport.cc
|
| diff --git a/webrtc/p2p/base/transport.cc b/webrtc/p2p/base/transport.cc
|
| index f9b7fd4a04379db2f0a124ef591bee4e010772c0..ab8fa4e70a165a55495de3d790d6ca1d707e6205 100644
|
| --- a/webrtc/p2p/base/transport.cc
|
| +++ b/webrtc/p2p/base/transport.cc
|
| @@ -135,7 +135,8 @@ Transport::Transport(rtc::Thread* signaling_thread,
|
| ice_role_(ICEROLE_UNKNOWN),
|
| tiebreaker_(0),
|
| protocol_(ICEPROTO_HYBRID),
|
| - remote_ice_mode_(ICEMODE_FULL) {
|
| + remote_ice_mode_(ICEMODE_FULL),
|
| + channel_receiving_timeout_(-1) {
|
| }
|
|
|
| Transport::~Transport() {
|
| @@ -174,6 +175,19 @@ bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) {
|
| return iter->second->GetRemoteCertificate(cert);
|
| }
|
|
|
| +void Transport::SetChannelReceivingTimeout(int timeout_ms) {
|
| + worker_thread_->Invoke<void>(Bind(
|
| + &Transport::SetChannelReceivingTimeout_w, this, timeout_ms));
|
| +}
|
| +
|
| +void Transport::SetChannelReceivingTimeout_w(int timeout_ms) {
|
| + ASSERT(worker_thread()->IsCurrent());
|
| + channel_receiving_timeout_ = timeout_ms;
|
| + for (const auto& kv : channels_) {
|
| + kv.second->SetReceivingTimeout(timeout_ms);
|
| + }
|
| +}
|
| +
|
| bool Transport::SetLocalTransportDescription(
|
| const TransportDescription& description,
|
| ContentAction action,
|
| @@ -233,6 +247,7 @@ TransportChannelImpl* Transport::CreateChannel_w(int component) {
|
| // Push down our transport state to the new channel.
|
| impl->SetIceRole(ice_role_);
|
| impl->SetIceTiebreaker(tiebreaker_);
|
| + impl->SetReceivingTimeout(channel_receiving_timeout_);
|
| // TODO(ronghuawu): Change CreateChannel_w to be able to return error since
|
| // below Apply**Description_w calls can fail.
|
| if (local_description_)
|
|
|