Index: net/quic/quic_session.cc |
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc |
index 7875bb8640bcd91eace78579b21a7b557951c036..12d190395968bf5855a1d1a5b7a15b027baad4ad 100644 |
--- a/net/quic/quic_session.cc |
+++ b/net/quic/quic_session.cc |
@@ -679,7 +679,12 @@ ReliableQuicStream* QuicSession::GetIncomingDynamicStream( |
// Check if the new number of open streams would cause the number of |
// open streams to exceed the limit. |
if (GetNumOpenStreams() >= get_max_open_streams()) { |
- CloseConnection(QUIC_TOO_MANY_OPEN_STREAMS); |
+ if (connection()->version() <= QUIC_VERSION_27) { |
+ CloseConnection(QUIC_TOO_MANY_OPEN_STREAMS); |
+ } else { |
+ // Refuse to open the stream. |
+ SendRstStream(stream_id, QUIC_REFUSED_STREAM, 0); |
+ } |
return nullptr; |
} |
} |