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

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

Issue 2292083006: Include the two QUIC version sets in connection close details. (Closed)
Patch Set: Include the two QUIC version sets in connection close details. 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 "Server already supports client's version and should have accepted the " 541 "Server already supports client's version and should have accepted the "
542 "connection."; 542 "connection.";
543 DLOG(WARNING) << error_details; 543 DLOG(WARNING) << error_details;
544 TearDownLocalConnectionState(QUIC_INVALID_VERSION_NEGOTIATION_PACKET, 544 TearDownLocalConnectionState(QUIC_INVALID_VERSION_NEGOTIATION_PACKET,
545 error_details, 545 error_details,
546 ConnectionCloseSource::FROM_SELF); 546 ConnectionCloseSource::FROM_SELF);
547 return; 547 return;
548 } 548 }
549 549
550 if (!SelectMutualVersion(packet.versions)) { 550 if (!SelectMutualVersion(packet.versions)) {
551 CloseConnection(QUIC_INVALID_VERSION, "No common version found.", 551 CloseConnection(
552 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); 552 QUIC_INVALID_VERSION,
553 "No common version found. Supported versions: {" +
554 QuicVersionVectorToString(framer_.supported_versions()) +
555 "}, peer supported versions: {" +
556 QuicVersionVectorToString(packet.versions) + "}",
557 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
553 return; 558 return;
554 } 559 }
555 560
556 DVLOG(1) << ENDPOINT 561 DVLOG(1) << ENDPOINT
557 << "Negotiated version: " << QuicVersionToString(version()); 562 << "Negotiated version: " << QuicVersionToString(version());
558 received_packet_manager_.SetVersion(version()); 563 received_packet_manager_.SetVersion(version());
559 server_supported_versions_ = packet.versions; 564 server_supported_versions_ = packet.versions;
560 version_negotiation_state_ = NEGOTIATION_IN_PROGRESS; 565 version_negotiation_state_ = NEGOTIATION_IN_PROGRESS;
561 RetransmitUnackedPackets(ALL_UNACKED_RETRANSMISSION); 566 RetransmitUnackedPackets(ALL_UNACKED_RETRANSMISSION);
562 } 567 }
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2554 2559
2555 void QuicConnection::CheckIfApplicationLimited() { 2560 void QuicConnection::CheckIfApplicationLimited() {
2556 if (queued_packets_.empty() && 2561 if (queued_packets_.empty() &&
2557 !sent_packet_manager_->HasPendingRetransmissions() && 2562 !sent_packet_manager_->HasPendingRetransmissions() &&
2558 !visitor_->WillingAndAbleToWrite()) { 2563 !visitor_->WillingAndAbleToWrite()) {
2559 sent_packet_manager_->OnApplicationLimited(); 2564 sent_packet_manager_->OnApplicationLimited();
2560 } 2565 }
2561 } 2566 }
2562 2567
2563 } // namespace net 2568 } // 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