Save all data from received IETF Connection Close frames
Save all data from received IETF connection close frames.
Also removes the QuicErrorCode that was prepended to the error details phrase. The phrase is the same on both the CONNECTION_CLOSE sender and receiver.
gfe-relnote: N/A rearranges existing code, new code is V99/IETF QUIC only.
PiperOrigin-RevId: 265442745
Change-Id: I1d487fc93f90863629e29b863b32c6ab9c6377e1
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index 15fcf24..fc4ec23 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -69,7 +69,7 @@
num_outgoing_static_streams_(0),
num_incoming_static_streams_(0),
num_locally_closed_incoming_streams_highest_offset_(0),
- error_(QUIC_NO_ERROR),
+ on_closed_frame_(QUIC_NO_ERROR, ""),
flow_controller_(
this,
QuicUtils::GetInvalidStreamId(connection->transport_version()),
@@ -397,8 +397,9 @@
RecordConnectionCloseAtServer(frame.quic_error_code, source);
}
- if (error_ == QUIC_NO_ERROR) {
- error_ = frame.quic_error_code;
+ if (on_closed_frame_.extracted_error_code == QUIC_NO_ERROR) {
+ // Save all of the connection close information
+ on_closed_frame_ = frame;
}
// Copy all non static streams in a new map for the ease of deleting.
@@ -429,8 +430,8 @@
if (visitor_) {
visitor_->OnConnectionClosed(connection_->connection_id(),
- frame.quic_error_code, frame.error_details,
- source);
+ frame.extracted_error_code,
+ frame.error_details, source);
}
}