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/quic/core/quic_connection.cc

Issue 2509153002: Deprecate FLAGS_quic_only_track_sent_packets. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection.cc
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index fdb17f8339d6d833c6cc7074d78b5f7d4c849f83..aba5db4d3e40dc77925cc1c8800710776ff8d8a5 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -1699,30 +1699,27 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) {
}
}
- if (FLAGS_quic_only_track_sent_packets) {
- // In some cases, an MTU probe can cause EMSGSIZE. This indicates that the
- // MTU discovery is permanently unsuccessful.
- if (result.status == WRITE_STATUS_ERROR &&
- result.error_code == kMessageTooBigErrorCode &&
- packet->retransmittable_frames.empty() &&
- packet->encrypted_length > long_term_mtu_) {
- mtu_discovery_target_ = 0;
- mtu_discovery_alarm_->Cancel();
- // The write failed, but the writer is not blocked, so return true.
- return true;
- }
+ // In some cases, an MTU probe can cause EMSGSIZE. This indicates that the
+ // MTU discovery is permanently unsuccessful.
+ if (result.status == WRITE_STATUS_ERROR &&
+ result.error_code == kMessageTooBigErrorCode &&
+ packet->retransmittable_frames.empty() &&
+ packet->encrypted_length > long_term_mtu_) {
+ mtu_discovery_target_ = 0;
+ mtu_discovery_alarm_->Cancel();
+ // The write failed, but the writer is not blocked, so return true.
+ return true;
+ }
- if (result.status == WRITE_STATUS_ERROR) {
- OnWriteError(result.error_code);
- DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted_length
- << " from host "
- << (self_address().address().empty()
- ? " empty address "
- : self_address().ToStringWithoutPort())
- << " to address " << peer_address().ToString()
- << " with error code " << result.error_code;
- return false;
- }
+ if (result.status == WRITE_STATUS_ERROR) {
+ OnWriteError(result.error_code);
+ DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted_length
+ << " from host " << (self_address().address().empty()
+ ? " empty address "
+ : self_address().ToStringWithoutPort())
+ << " to address " << peer_address().ToString()
+ << " with error code " << result.error_code;
+ return false;
}
if (result.status != WRITE_STATUS_ERROR && debug_visitor_ != nullptr) {
@@ -1768,31 +1765,6 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) {
++stats_.packets_retransmitted;
}
- if (!FLAGS_quic_only_track_sent_packets) {
- // In some cases, an MTU probe can cause EMSGSIZE. This indicates that the
- // MTU discovery is permanently unsuccessful.
- if (result.status == WRITE_STATUS_ERROR &&
- result.error_code == kMessageTooBigErrorCode &&
- packet->retransmittable_frames.empty() &&
- packet->encrypted_length > long_term_mtu_) {
- mtu_discovery_target_ = 0;
- mtu_discovery_alarm_->Cancel();
- return true;
- }
-
- if (result.status == WRITE_STATUS_ERROR) {
- OnWriteError(result.error_code);
- DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted_length
- << " from host "
- << (self_address().address().empty()
- ? " empty address "
- : self_address().ToStringWithoutPort())
- << " to address " << peer_address().ToString()
- << " with error code " << result.error_code;
- return false;
- }
- }
-
return true;
}
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698