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

Unified Diff: net/quic/quic_connection.cc

Issue 198263003: Avoiding a double disconnect scenario, and DFATALs on server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 273f4f54d8ecaff1908792d558c21a5dcdcf46de..722d399d0103bd99c75ae5642cca9912a187380d 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1618,7 +1618,12 @@ void QuicConnection::SendConnectionCloseWithDetails(QuicErrorCode error,
// If we're write blocked, WritePacket() will not send, but will capture the
// serialized packet.
SendConnectionClosePacket(error, details);
- CloseConnection(error, false);
+ if (connected_) {
+ // It's possible that while sending the connection close packet, we get a
+ // socket error and disconnect right then and there. Avoid a double
+ // disconnect in that case.
+ CloseConnection(error, false);
+ }
}
void QuicConnection::SendConnectionClosePacket(QuicErrorCode error,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698