Verify receipt of connection_close in quic_client_interop
This CL also changes QuicFramer::MaybeExtractQuicErrorCode to map NO_IETF_QUIC_ERROR to QUIC_NO_ERROR.
gfe-relnote: change mapping of NO_IETF_QUIC_ERROR, not flag-protected
PiperOrigin-RevId: 274704993
Change-Id: If3e7f98dd6a2435a477ee318b44fce78e6ab6e30
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index a759adb..2d4d4a5 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -6603,7 +6603,12 @@
uint64_t extracted_error_code;
if (ed.size() < 2 || !QuicTextUtils::IsAllDigits(ed[0]) ||
!QuicTextUtils::StringToUint64(ed[0], &extracted_error_code)) {
- frame->extracted_error_code = QUIC_IETF_GQUIC_ERROR_MISSING;
+ if (frame->close_type == IETF_QUIC_TRANSPORT_CONNECTION_CLOSE &&
+ frame->transport_error_code == NO_IETF_QUIC_ERROR) {
+ frame->extracted_error_code = QUIC_NO_ERROR;
+ } else {
+ frame->extracted_error_code = QUIC_IETF_GQUIC_ERROR_MISSING;
+ }
return;
}
// Return the error code (numeric) and the error details string without the