Index: net/quic/quic_connection.cc |
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
index 8d49010c9e62e974be26fca7aac2e9b5df607537..72529900f9b2de6446354a6308a910f028dd4f89 100644 |
--- a/net/quic/quic_connection.cc |
+++ b/net/quic/quic_connection.cc |
@@ -1408,15 +1408,6 @@ bool QuicConnection::WritePacketInner(QueuedPacket* packet) { |
if (result.error_code == ERR_IO_PENDING) { |
DCHECK_EQ(WRITE_STATUS_BLOCKED, result.status); |
} |
- if (debug_visitor_.get() != nullptr) { |
- // Pass the write result to the visitor. |
- debug_visitor_->OnPacketSent(sequence_number, |
- packet->original_sequence_number, |
- packet->encryption_level, |
- packet->transmission_type, |
- *encrypted, |
- result); |
- } |
if (result.status == WRITE_STATUS_BLOCKED) { |
visitor_->OnWriteBlocked(); |
@@ -1429,6 +1420,15 @@ bool QuicConnection::WritePacketInner(QueuedPacket* packet) { |
} |
} |
QuicTime now = clock_->Now(); |
+ if (result.status != WRITE_STATUS_ERROR && debug_visitor_.get() != nullptr) { |
+ // Pass the write result to the visitor. |
+ debug_visitor_->OnPacketSent(packet->serialized_packet, |
+ packet->original_sequence_number, |
+ packet->encryption_level, |
+ packet->transmission_type, |
+ *encrypted, |
+ now); |
+ } |
if (packet->transmission_type == NOT_RETRANSMISSION) { |
time_of_last_sent_new_packet_ = now; |
} |