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

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

Issue 475173005: Clear the QUIC ping alarm when a connection in closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Rename_OnPacketSent_73651039
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 | « 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 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 return; 1785 return;
1786 } 1786 }
1787 connected_ = false; 1787 connected_ = false;
1788 if (debug_visitor_.get() != NULL) { 1788 if (debug_visitor_.get() != NULL) {
1789 debug_visitor_->OnConnectionClosed(error, from_peer); 1789 debug_visitor_->OnConnectionClosed(error, from_peer);
1790 } 1790 }
1791 visitor_->OnConnectionClosed(error, from_peer); 1791 visitor_->OnConnectionClosed(error, from_peer);
1792 // Cancel the alarms so they don't trigger any action now that the 1792 // Cancel the alarms so they don't trigger any action now that the
1793 // connection is closed. 1793 // connection is closed.
1794 ack_alarm_->Cancel(); 1794 ack_alarm_->Cancel();
1795 ping_alarm_->Cancel();
1795 resume_writes_alarm_->Cancel(); 1796 resume_writes_alarm_->Cancel();
1796 retransmission_alarm_->Cancel(); 1797 retransmission_alarm_->Cancel();
1797 send_alarm_->Cancel(); 1798 send_alarm_->Cancel();
1798 timeout_alarm_->Cancel(); 1799 timeout_alarm_->Cancel();
1799 } 1800 }
1800 1801
1801 void QuicConnection::SendGoAway(QuicErrorCode error, 1802 void QuicConnection::SendGoAway(QuicErrorCode error,
1802 QuicStreamId last_good_stream_id, 1803 QuicStreamId last_good_stream_id,
1803 const string& reason) { 1804 const string& reason) {
1804 DVLOG(1) << ENDPOINT << "Going away with error " 1805 DVLOG(1) << ENDPOINT << "Going away with error "
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 // If we changed the generator's batch state, restore original batch state. 1985 // If we changed the generator's batch state, restore original batch state.
1985 if (!already_in_batch_mode_) { 1986 if (!already_in_batch_mode_) {
1986 DVLOG(1) << "Leaving Batch Mode."; 1987 DVLOG(1) << "Leaving Batch Mode.";
1987 connection_->packet_generator_.FinishBatchOperations(); 1988 connection_->packet_generator_.FinishBatchOperations();
1988 } 1989 }
1989 DCHECK_EQ(already_in_batch_mode_, 1990 DCHECK_EQ(already_in_batch_mode_,
1990 connection_->packet_generator_.InBatchMode()); 1991 connection_->packet_generator_.InBatchMode());
1991 } 1992 }
1992 1993
1993 } // namespace net 1994 } // 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