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

Side by Side Diff: net/quic/quic_connection.cc

Issue 898243002: Adding more error logging for failed QUIC writes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Further_cleanup_to_QuicAckNotifier_84784925
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 1536
1537 stats_.bytes_sent += result.bytes_written; 1537 stats_.bytes_sent += result.bytes_written;
1538 ++stats_.packets_sent; 1538 ++stats_.packets_sent;
1539 if (packet->transmission_type != NOT_RETRANSMISSION) { 1539 if (packet->transmission_type != NOT_RETRANSMISSION) {
1540 stats_.bytes_retransmitted += result.bytes_written; 1540 stats_.bytes_retransmitted += result.bytes_written;
1541 ++stats_.packets_retransmitted; 1541 ++stats_.packets_retransmitted;
1542 } 1542 }
1543 1543
1544 if (result.status == WRITE_STATUS_ERROR) { 1544 if (result.status == WRITE_STATUS_ERROR) {
1545 OnWriteError(result.error_code); 1545 OnWriteError(result.error_code);
1546 DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted->length()
1547 << "bytes "
1548 << " from host " << self_address().ToStringWithoutPort()
1549 << " to address " << peer_address().ToString();
1546 return false; 1550 return false;
1547 } 1551 }
1548 1552
1549 return true; 1553 return true;
1550 } 1554 }
1551 1555
1552 bool QuicConnection::ShouldDiscardPacket(const QueuedPacket& packet) { 1556 bool QuicConnection::ShouldDiscardPacket(const QueuedPacket& packet) {
1553 if (!connected_) { 1557 if (!connected_) {
1554 DVLOG(1) << ENDPOINT 1558 DVLOG(1) << ENDPOINT
1555 << "Not sending packet as connection is disconnected."; 1559 << "Not sending packet as connection is disconnected.";
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 } 2117 }
2114 for (const QuicFrame& frame : retransmittable_frames->frames()) { 2118 for (const QuicFrame& frame : retransmittable_frames->frames()) {
2115 if (frame.type == CONNECTION_CLOSE_FRAME) { 2119 if (frame.type == CONNECTION_CLOSE_FRAME) {
2116 return true; 2120 return true;
2117 } 2121 }
2118 } 2122 }
2119 return false; 2123 return false;
2120 } 2124 }
2121 2125
2122 } // namespace net 2126 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698