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

Unified Diff: net/quic/quic_connection.cc

Issue 198353003: Land Recent QUIC Changes (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 | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger.h » ('j') | 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..dce0ca15c8305b7a53e9828d7bc98723bf864c6a 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -389,8 +389,7 @@ bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) {
debug_visitor_->OnPacketHeader(header);
}
- if (header.fec_flag && framer_.version() <= QUIC_VERSION_14) {
- DLOG(WARNING) << "Ignoring FEC packets for versions prior to 15.";
+ if (header.fec_flag && framer_.version() == QUIC_VERSION_13) {
return false;
}
@@ -1301,8 +1300,11 @@ bool QuicConnection::WritePacket(QueuedPacket packet) {
}
if (debug_visitor_) {
// Pass the write result to the visitor.
- debug_visitor_->OnPacketSent(
- sequence_number, packet.encryption_level, *encrypted, result);
+ debug_visitor_->OnPacketSent(sequence_number,
+ packet.encryption_level,
+ packet.transmission_type,
+ *encrypted,
+ result);
}
if (result.status == WRITE_STATUS_BLOCKED) {
visitor_->OnWriteBlocked();
@@ -1618,7 +1620,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 | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698