Prevent QUIC streams from closing the connection directly.
Instead the error is passed through a delegate to the QUIC session to handle.
gfe-relnote: no behavior change. not protected.
PiperOrigin-RevId: 294729094
Change-Id: I4f0fc7b4ddbcd34ddf549ae4d053cbcc78535987
diff --git a/quic/core/quic_session.h b/quic/core/quic_session.h
index 138f6c1..390dc73 100644
--- a/quic/core/quic_session.h
+++ b/quic/core/quic_session.h
@@ -28,6 +28,7 @@
#include "net/third_party/quiche/src/quic/core/quic_types.h"
#include "net/third_party/quiche/src/quic/core/quic_write_blocked_list.h"
#include "net/third_party/quiche/src/quic/core/session_notifier_interface.h"
+#include "net/third_party/quiche/src/quic/core/stream_delegate_interface.h"
#include "net/third_party/quiche/src/quic/core/uber_quic_stream_id_manager.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_containers.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
@@ -50,7 +51,8 @@
public SessionNotifierInterface,
public QuicStreamFrameDataProducer,
public QuicStreamIdManager::DelegateInterface,
- public HandshakerDelegateInterface {
+ public HandshakerDelegateInterface,
+ public StreamDelegateInterface {
public:
// An interface from the session to the entity owning the session.
// This lets the session notify its owner (the Dispatcher) when the connection
@@ -256,6 +258,10 @@
void NeuterUnencryptedData() override;
void NeuterHandshakeData() override;
+ // Implement StreamDelegateInterface.
+ void OnStreamError(QuicErrorCode error_code,
+ std::string error_details) override;
+
// Called by the QuicCryptoStream when a handshake message is sent.
virtual void OnCryptoHandshakeMessageSent(
const CryptoHandshakeMessage& message);