OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |