Index: net/quic/core/quic_crypto_stream.cc |
diff --git a/net/quic/core/quic_crypto_stream.cc b/net/quic/core/quic_crypto_stream.cc |
index be7271c519f797009d8045845ba920c8ca22ecd3..fcb5397ce4dff73b42f78e8a29bf4366d6c320a1 100644 |
--- a/net/quic/core/quic_crypto_stream.cc |
+++ b/net/quic/core/quic_crypto_stream.cc |
@@ -69,7 +69,8 @@ void QuicCryptoStream::OnDataAvailable() { |
return; |
} |
sequencer()->MarkConsumed(iov.iov_len); |
- if (handshake_confirmed_ && crypto_framer_.InputBytesRemaining() == 0) { |
+ if (handshake_confirmed_ && crypto_framer_.InputBytesRemaining() == 0 && |
+ FLAGS_quic_release_crypto_stream_buffer) { |
// If the handshake is complete and the current message has been fully |
// processed then no more handshake messages are likely to arrive soon |
// so release the memory in the stream sequencer. |