Change QuicStream::CloseConnectionWithDetails() to QuicStream::OnUnrecoverableError.
The stream shouldn't be able to instruct the session on what to do. Instead, it should just report its state change and let the session handle it.
gfe-relnote: name change only. Not protected.
PiperOrigin-RevId: 294966339
Change-Id: Ibff2ed7169d0964ea5f19823445f5aa9ce8c5916
diff --git a/quic/core/http/quic_headers_stream.cc b/quic/core/http/quic_headers_stream.cc
index 5b1a87b..1bac2b7 100644
--- a/quic/core/http/quic_headers_stream.cc
+++ b/quic/core/http/quic_headers_stream.cc
@@ -85,8 +85,8 @@
if (header.unacked_length < header_length) {
QUIC_BUG << "Unsent stream data is acked. unacked_length: "
<< header.unacked_length << " acked_length: " << header_length;
- CloseConnectionWithDetails(QUIC_INTERNAL_ERROR,
- "Unsent stream data is acked");
+ OnUnrecoverableError(QUIC_INTERNAL_ERROR,
+ "Unsent stream data is acked");
return false;
}
if (header.ack_listener != nullptr && header_length > 0) {