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

Unified Diff: net/quic/quic_session.cc

Issue 575593002: Fix QUIC crash on ConnectionClose, protected behind renamed flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_LOG_DFATAL_75537267
Patch Set: Created 6 years, 3 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
Index: net/quic/quic_session.cc
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 7fd5ae9c73217341e85c514be95b31e94174d03d..0f5be9c9dffd3b3f625dc6ee06dd45acbf6b70e7 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -428,12 +428,6 @@ void QuicSession::CloseStreamInner(QuicStreamId stream_id,
stream->flow_controller()->IsEnabled()) {
locally_closed_streams_highest_offset_[stream_id] =
stream->flow_controller()->highest_received_byte_offset();
- if (FLAGS_close_quic_connection_unfinished_streams &&
- connection()->connected() &&
- locally_closed_streams_highest_offset_.size() > max_open_streams_) {
- // A buggy client may fail to send FIN/RSTs. Don't tolerate this.
- connection_->SendConnectionClose(QUIC_TOO_MANY_UNFINISHED_STREAMS);
- }
}
stream_map_.erase(it);
@@ -760,6 +754,13 @@ bool QuicSession::GetSSLInfo(SSLInfo* ssl_info) const {
void QuicSession::PostProcessAfterData() {
STLDeleteElements(&closed_streams_);
closed_streams_.clear();
+
+ if (FLAGS_close_quic_connection_unfinished_streams_2 &&
+ connection()->connected() &&
+ locally_closed_streams_highest_offset_.size() > max_open_streams_) {
+ // A buggy client may fail to send FIN/RSTs. Don't tolerate this.
+ connection_->SendConnectionClose(QUIC_TOO_MANY_UNFINISHED_STREAMS);
+ }
}
void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) {

Powered by Google App Engine
This is Rietveld 408576698