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

Unified Diff: net/quic/quic_flow_controller.cc

Issue 1548783002: Adding details to most quic connection close calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110540464
Patch Set: Created 5 years 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_crypto_stream_test.cc ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_flow_controller.cc
diff --git a/net/quic/quic_flow_controller.cc b/net/quic/quic_flow_controller.cc
index 177f0a4606dcf1d6b2cd5d3d9bdcf1e0557294d8..dd0d77913de9c9b316cb52509bfa306a1484be7a 100644
--- a/net/quic/quic_flow_controller.cc
+++ b/net/quic/quic_flow_controller.cc
@@ -5,6 +5,7 @@
#include "net/quic/quic_flow_controller.h"
#include "base/basictypes.h"
+#include "base/strings/stringprintf.h"
#include "net/quic/quic_connection.h"
#include "net/quic/quic_flags.h"
#include "net/quic/quic_protocol.h"
@@ -73,7 +74,11 @@ void QuicFlowController::AddBytesSent(QuicByteCount bytes_sent) {
bytes_sent_ = send_window_offset_;
// This is an error on our side, close the connection as soon as possible.
- connection_->SendConnectionClose(QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA);
+ connection_->SendConnectionCloseWithDetails(
+ QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA,
+ base::StringPrintf("%lu bytes over send window offset",
+ send_window_offset_ - (bytes_sent_ + bytes_sent))
+ .c_str());
return;
}
« no previous file with comments | « net/quic/quic_crypto_stream_test.cc ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698