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

Unified Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 1839803006: Signal ready-to-send when switching to a writable connection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index 8cb1ffe8bc25d7b0380eadb8ff9fe5c117f3393a..fbac24768e0280d31323e72bbc1f76986fb90cd8 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -1163,6 +1163,14 @@ void P2PTransportChannel::SwitchBestConnectionTo(Connection* conn) {
LOG_J(LS_INFO, this) << "New best connection: "
<< best_connection_->ToString();
SignalRouteChange(this, best_connection_->remote_candidate());
+ // This is a temporary, but safe fix to webrtc issue 5705.
+ // TODO(honghaiz): Make all EWOULDBLOCK error routed through the transport
+ // channel so that it knows whether the media channel is allowed to
+ // send; then it will only signal ready-to-send if the media channel
+ // has been disallowed to send.
+ if (best_connection_->writable()) {
+ SignalReadyToSend(this);
+ }
} else {
LOG_J(LS_INFO, this) << "No best connection";
}
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698