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

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
« no previous file with comments | « 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..819dfdef9d33a93a4452863152dedeeae52ceac0 100644
--- a/webrtc/p2p/base/tcpport.cc
+++ b/webrtc/p2p/base/tcpport.cc
@@ -355,10 +355,16 @@ 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.
- pretending_to_be_writable_ = false;
+ // Process the STUN response before we inform upper layer ready to send.
Connection::OnConnectionRequestResponse(req, response);
+
+ // 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();
+ }
+ pretending_to_be_writable_ = false;
ASSERT(write_state() == STATE_WRITABLE);
}
« no previous file with comments | « webrtc/p2p/base/port_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698