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

Unified Diff: net/spdy/buffered_spdy_framer.cc

Issue 1360253002: Log GOAWAY frame debug data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 5 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
Index: net/spdy/buffered_spdy_framer.cc
diff --git a/net/spdy/buffered_spdy_framer.cc b/net/spdy/buffered_spdy_framer.cc
index 2fa15b8b9b860c2582e6ec1fb8cfc508af023bfa..a5e300b26f39e237c45d114df7283ed4bb5dd9f8 100644
--- a/net/spdy/buffered_spdy_framer.cc
+++ b/net/spdy/buffered_spdy_framer.cc
@@ -226,7 +226,22 @@ void BufferedSpdyFramer::OnRstStream(SpdyStreamId stream_id,
}
void BufferedSpdyFramer::OnGoAway(SpdyStreamId last_accepted_stream_id,
SpdyGoAwayStatus status) {
- visitor_->OnGoAway(last_accepted_stream_id, status);
+ DCHECK(!go_away_fields_.get());
+ go_away_fields_.reset(new GoAwayFields());
+ go_away_fields_->last_accepted_stream_id = last_accepted_stream_id;
+ go_away_fields_->status = status;
+}
+
+bool BufferedSpdyFramer::OnGoAwayFrameData(const char* goaway_data,
+ size_t len) {
+ if (len > 0) {
+ go_away_fields_->debug_data.append(goaway_data, len);
+ return true;
+ }
+ visitor_->OnGoAway(go_away_fields_->last_accepted_stream_id,
+ go_away_fields_->status, go_away_fields_->debug_data);
+ go_away_fields_.reset(nullptr);
+ return true;
}
Ryan Hamilton 2015/10/05 21:17:55 This method wasn't overridden previously, right? W
Bence 2015/10/06 15:18:57 Exactly: it returns true. https://code.google.com/
void BufferedSpdyFramer::OnWindowUpdate(SpdyStreamId stream_id,

Powered by Google App Engine
This is Rietveld 408576698