diff options
author | sergeyu <sergeyu@chromium.org> | 2016-01-05 17:56:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-06 01:57:08 +0000 |
commit | dc18b47cf9909de1942b67c2efe783e79d58ab10 (patch) | |
tree | 2ab3ed1a8d495ed669f0311f73800f82f3bc8413 /remoting | |
parent | bcaf62bdd2b84e26cf419ea483584cc6ef918330 (diff) | |
download | chromium_src-dc18b47cf9909de1942b67c2efe783e79d58ab10.zip chromium_src-dc18b47cf9909de1942b67c2efe783e79d58ab10.tar.gz chromium_src-dc18b47cf9909de1942b67c2efe783e79d58ab10.tar.bz2 |
Don't wait for receiving state in IceTransportChannel.
This change reverts crrev.com/354097 which was needed for QUIC, and is
not longer required. PseudoTcpChannelFactory initializes PseudoTcp only
after the underlying ICE channel is connected. ICE channel may get to
"receiving" state only after it has received some data. That sometimes
cause the PseudoTcpAdapter to be initialized only after the first ACK
is received and as result that ACK is lost. This issue was causing
Ice/ConnectionTest tests to take more than 3 seconds because they had
to wait for the second ACK.
Review URL: https://codereview.chromium.org/1567513002
Cr-Commit-Position: refs/heads/master@{#367747}
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/protocol/ice_transport_channel.cc | 13 | ||||
-rw-r--r-- | remoting/protocol/ice_transport_channel.h | 1 |
2 files changed, 4 insertions, 10 deletions
diff --git a/remoting/protocol/ice_transport_channel.cc b/remoting/protocol/ice_transport_channel.cc index 45919ab..75413d7 100644 --- a/remoting/protocol/ice_transport_channel.cc +++ b/remoting/protocol/ice_transport_channel.cc @@ -110,8 +110,6 @@ void IceTransportChannel::OnPortAllocatorCreated( this, &IceTransportChannel::OnCandidateGathered); channel_->SignalRouteChange.connect( this, &IceTransportChannel::OnRouteChange); - channel_->SignalReceivingState.connect( - this, &IceTransportChannel::OnReceivingState); channel_->SignalWritableState.connect( this, &IceTransportChannel::OnWritableState); channel_->set_incoming_only(!(transport_context_->network_settings().flags & @@ -137,6 +135,10 @@ void IceTransportChannel::OnPortAllocatorCreated( reconnect_timer_.Start( FROM_HERE, base::TimeDelta::FromSeconds(kReconnectDelaySeconds), this, &IceTransportChannel::TryReconnect); + + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(&IceTransportChannel::NotifyConnected, + weak_factory_.GetWeakPtr())); } void IceTransportChannel::NotifyConnected() { @@ -202,13 +204,6 @@ void IceTransportChannel::OnRouteChange( NotifyRouteChanged(); } -void IceTransportChannel::OnReceivingState(cricket::TransportChannel* channel) { - DCHECK_EQ(channel, static_cast<cricket::TransportChannel*>(channel_.get())); - - if (channel->receiving() && !callback_.is_null()) - NotifyConnected(); -} - void IceTransportChannel::OnWritableState(cricket::TransportChannel* channel) { DCHECK_EQ(channel, static_cast<cricket::TransportChannel*>(channel_.get())); diff --git a/remoting/protocol/ice_transport_channel.h b/remoting/protocol/ice_transport_channel.h index 08acad9..ca69d1f 100644 --- a/remoting/protocol/ice_transport_channel.h +++ b/remoting/protocol/ice_transport_channel.h @@ -95,7 +95,6 @@ class IceTransportChannel : public sigslot::has_slots<> { const cricket::Candidate& candidate); void OnRouteChange(cricket::TransportChannel* channel, const cricket::Candidate& candidate); - void OnReceivingState(cricket::TransportChannel* channel); void OnWritableState(cricket::TransportChannel* channel); // Callback for TransportChannelSocketAdapter to notify when the socket is |