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

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

Issue 1288553010: TcpPort Reconnect should inform upper layer to start sending again (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 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
« webrtc/p2p/base/port_unittest.cc ('K') | « webrtc/p2p/base/port_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/tcpport.cc
diff --git a/webrtc/p2p/base/tcpport.cc b/webrtc/p2p/base/tcpport.cc
index 5c9e0425c80fc3d9ae138288d417ff41c08c7696..3360ce69fc101fea9e37c4f77e230cf9e060af91 100644
--- a/webrtc/p2p/base/tcpport.cc
+++ b/webrtc/p2p/base/tcpport.cc
@@ -355,8 +355,12 @@ int TCPConnection::GetError() {
void TCPConnection::OnConnectionRequestResponse(ConnectionRequest* req,
StunMessage* response) {
- // Once we receive a binding response, we are really writable, and not just
- // pretending to be writable.
+ // If we're in the state of pretending to be writeable, we should inform the
+ // upper layer it's ready to send again as previous EWOULDLBLOCK from socket
+ // would have stopped the outgoing stream.
+ if (pretending_to_be_writable_) {
+ Connection::OnReadyToSend();
pthatcher1 2015/08/20 03:47:27 If we fire OnReadyToSend() when we go from pretend
juberti1 2015/08/20 05:33:00 That is driven by EWOULDBLOCK being returned from
guoweis_webrtc 2015/08/21 05:05:50 Yes, this is possible. Moved this down
+ }
pretending_to_be_writable_ = false;
Connection::OnConnectionRequestResponse(req, response);
ASSERT(write_state() == STATE_WRITABLE);
« webrtc/p2p/base/port_unittest.cc ('K') | « webrtc/p2p/base/port_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698