Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: webrtc/p2p/base/port.cc

Issue 2374183005: Emit SignalReadyToSend even for "presumed writable" connections. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 if (network_cost != remote_candidate_.network_cost()) { 1099 if (network_cost != remote_candidate_.network_cost()) {
1100 remote_candidate_.set_network_cost(network_cost); 1100 remote_candidate_.set_network_cost(network_cost);
1101 // Network cost change will affect the connection ranking, so signal 1101 // Network cost change will affect the connection ranking, so signal
1102 // state change to force a re-sort in P2PTransportChannel. 1102 // state change to force a re-sort in P2PTransportChannel.
1103 SignalStateChange(this); 1103 SignalStateChange(this);
1104 } 1104 }
1105 } 1105 }
1106 } 1106 }
1107 1107
1108 void Connection::OnReadyToSend() { 1108 void Connection::OnReadyToSend() {
1109 if (write_state_ == STATE_WRITABLE) { 1109 SignalReadyToSend(this);
1110 SignalReadyToSend(this);
1111 }
1112 } 1110 }
1113 1111
1114 void Connection::Prune() { 1112 void Connection::Prune() {
1115 if (!pruned_ || active()) { 1113 if (!pruned_ || active()) {
1116 LOG_J(LS_INFO, this) << "Connection pruned"; 1114 LOG_J(LS_INFO, this) << "Connection pruned";
1117 pruned_ = true; 1115 pruned_ = true;
1118 requests_.Clear(); 1116 requests_.Clear();
1119 set_write_state(STATE_WRITE_TIMEOUT); 1117 set_write_state(STATE_WRITE_TIMEOUT);
1120 } 1118 }
1121 } 1119 }
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 ASSERT(sent < 0); 1570 ASSERT(sent < 0);
1573 error_ = port_->GetError(); 1571 error_ = port_->GetError();
1574 stats_.sent_discarded_packets++; 1572 stats_.sent_discarded_packets++;
1575 } else { 1573 } else {
1576 send_rate_tracker_.AddSamples(sent); 1574 send_rate_tracker_.AddSamples(sent);
1577 } 1575 }
1578 return sent; 1576 return sent;
1579 } 1577 }
1580 1578
1581 } // namespace cricket 1579 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698