Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1553)

Unified Diff: net/quic/core/quic_crypto_stream.cc

Issue 2387753002: Release read buffer of QuicCryptoStream when incoming message become less frequent. Protected by --… (Closed)
Patch Set: enable quic crypto stream release buffer Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_crypto_client_stream_test.cc ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ed8e20cc2ec17fb1ba7ed62c0b5fdf572b3ff84a..be7271c519f797009d8045845ba920c8ca22ecd3 100644
--- a/net/quic/core/quic_crypto_stream.cc
+++ b/net/quic/core/quic_crypto_stream.cc
@@ -69,6 +69,12 @@ void QuicCryptoStream::OnDataAvailable() {
return;
}
sequencer()->MarkConsumed(iov.iov_len);
+ if (handshake_confirmed_ && crypto_framer_.InputBytesRemaining() == 0) {
+ // 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.
+ sequencer()->ReleaseBufferIfEmpty();
+ }
}
}
« no previous file with comments | « net/quic/core/quic_crypto_client_stream_test.cc ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698