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

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

Issue 454563002: Trigger internal QUIC "trace graph" trace dumping also in cases where (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Close_QUIC_connection_72561976
Patch Set: Created 6 years, 4 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 | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger.h » ('j') | 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 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 packet_generator_.FlushAllQueuedFrames(); 1789 packet_generator_.FlushAllQueuedFrames();
1790 } 1790 }
1791 1791
1792 void QuicConnection::CloseConnection(QuicErrorCode error, bool from_peer) { 1792 void QuicConnection::CloseConnection(QuicErrorCode error, bool from_peer) {
1793 if (!connected_) { 1793 if (!connected_) {
1794 DLOG(DFATAL) << "Error: attempt to close an already closed connection" 1794 DLOG(DFATAL) << "Error: attempt to close an already closed connection"
1795 << base::debug::StackTrace().ToString(); 1795 << base::debug::StackTrace().ToString();
1796 return; 1796 return;
1797 } 1797 }
1798 connected_ = false; 1798 connected_ = false;
1799 if (debug_visitor_.get() != NULL) {
1800 debug_visitor_->OnConnectionClosed(error, from_peer);
1801 }
1799 visitor_->OnConnectionClosed(error, from_peer); 1802 visitor_->OnConnectionClosed(error, from_peer);
1800 // Cancel the alarms so they don't trigger any action now that the 1803 // Cancel the alarms so they don't trigger any action now that the
1801 // connection is closed. 1804 // connection is closed.
1802 ack_alarm_->Cancel(); 1805 ack_alarm_->Cancel();
1803 resume_writes_alarm_->Cancel(); 1806 resume_writes_alarm_->Cancel();
1804 retransmission_alarm_->Cancel(); 1807 retransmission_alarm_->Cancel();
1805 send_alarm_->Cancel(); 1808 send_alarm_->Cancel();
1806 timeout_alarm_->Cancel(); 1809 timeout_alarm_->Cancel();
1807 } 1810 }
1808 1811
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 // If we changed the generator's batch state, restore original batch state. 1986 // If we changed the generator's batch state, restore original batch state.
1984 if (!already_in_batch_mode_) { 1987 if (!already_in_batch_mode_) {
1985 DVLOG(1) << "Leaving Batch Mode."; 1988 DVLOG(1) << "Leaving Batch Mode.";
1986 connection_->packet_generator_.FinishBatchOperations(); 1989 connection_->packet_generator_.FinishBatchOperations();
1987 } 1990 }
1988 DCHECK_EQ(already_in_batch_mode_, 1991 DCHECK_EQ(already_in_batch_mode_,
1989 connection_->packet_generator_.InBatchMode()); 1992 connection_->packet_generator_.InBatchMode());
1990 } 1993 }
1991 1994
1992 } // namespace net 1995 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698