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; |
} |