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

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

Issue 2320083005: Log error code for write errors in QuicConnection. (Closed)
Patch Set: Created 4 years, 3 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/core/quic_connection.h" 5 #include "net/quic/core/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 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 return true; 1737 return true;
1738 } 1738 }
1739 1739
1740 if (result.status == WRITE_STATUS_ERROR) { 1740 if (result.status == WRITE_STATUS_ERROR) {
1741 OnWriteError(result.error_code); 1741 OnWriteError(result.error_code);
1742 DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted_length 1742 DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted_length
1743 << " bytes " 1743 << " bytes "
1744 << " from host " << (self_address().address().empty() 1744 << " from host " << (self_address().address().empty()
1745 ? " empty address " 1745 ? " empty address "
1746 : self_address().ToStringWithoutPort()) 1746 : self_address().ToStringWithoutPort())
1747 << " to address " << peer_address().ToString(); 1747 << " to address " << peer_address().ToString()
1748 << " with error code " << result.error_code;
1748 return false; 1749 return false;
1749 } 1750 }
1750 1751
1751 return true; 1752 return true;
1752 } 1753 }
1753 1754
1754 bool QuicConnection::ShouldDiscardPacket(const SerializedPacket& packet) { 1755 bool QuicConnection::ShouldDiscardPacket(const SerializedPacket& packet) {
1755 if (!connected_) { 1756 if (!connected_) {
1756 DVLOG(1) << ENDPOINT << "Not sending packet as connection is disconnected."; 1757 DVLOG(1) << ENDPOINT << "Not sending packet as connection is disconnected.";
1757 return true; 1758 return true;
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 2560
2560 void QuicConnection::CheckIfApplicationLimited() { 2561 void QuicConnection::CheckIfApplicationLimited() {
2561 if (queued_packets_.empty() && 2562 if (queued_packets_.empty() &&
2562 !sent_packet_manager_->HasPendingRetransmissions() && 2563 !sent_packet_manager_->HasPendingRetransmissions() &&
2563 !visitor_->WillingAndAbleToWrite()) { 2564 !visitor_->WillingAndAbleToWrite()) {
2564 sent_packet_manager_->OnApplicationLimited(); 2565 sent_packet_manager_->OnApplicationLimited();
2565 } 2566 }
2566 } 2567 }
2567 2568
2568 } // namespace net 2569 } // 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