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

Unified Diff: net/quic/core/quic_connection.cc

Issue 2511893003: In case of stateless reject, change quic connection close source from client to server on client si… (Closed)
Patch Set: Created 4 years, 1 month 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 | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection.cc
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index 8cff7e0762acd3f92f0ec693495c1718d0b38160..b4b351d660c7787cd03f1bf78aa09258e20e4503 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -2054,8 +2054,13 @@ void QuicConnection::CloseConnection(
SendConnectionClosePacket(error, error_details, NO_ACK);
}
- TearDownLocalConnectionState(error, error_details,
- ConnectionCloseSource::FROM_SELF);
+ ConnectionCloseSource source = ConnectionCloseSource::FROM_SELF;
+ if (perspective_ == Perspective::IS_CLIENT &&
+ error == QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT) {
+ // Regard stateless rejected connection as closed by server.
+ source = ConnectionCloseSource::FROM_PEER;
+ }
+ TearDownLocalConnectionState(error, error_details, source);
}
void QuicConnection::SendConnectionClosePacket(QuicErrorCode error,
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698