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

Unified Diff: net/quic/quic_protocol.cc

Issue 242483002: Downgrading rst stream codes which wouldn't be recognized by the peer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/quic_protocol.h ('k') | net/quic/quic_protocol_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.cc
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index 5a59809ee4c14ac095e972b4a7bf1e4d4c16fe0d..f34db6d24e4fc9016a6dc6db8ec5dc037c87bdee 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -275,6 +275,21 @@ QuicCongestionFeedbackFrame::QuicCongestionFeedbackFrame() : type(kTCP) {}
QuicCongestionFeedbackFrame::~QuicCongestionFeedbackFrame() {}
+QuicRstStreamErrorCode AdjustErrorForVersion(
+ QuicRstStreamErrorCode error_code,
+ QuicVersion version) {
+ switch (error_code) {
+ case QUIC_RST_FLOW_CONTROL_ACCOUNTING:
+ if (version <= QUIC_VERSION_17) {
+ return QUIC_STREAM_NO_ERROR;
+ }
+ break;
+ default:
+ return error_code;
+ }
+ return error_code;
+}
+
QuicRstStreamFrame::QuicRstStreamFrame()
: stream_id(0),
error_code(QUIC_STREAM_NO_ERROR) {
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698