| 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/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 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2000 } | 2000 } |
| 2001 if (debug_visitor_ != nullptr) { | 2001 if (debug_visitor_ != nullptr) { |
| 2002 debug_visitor_->OnConnectionClosed(error, error_details, source); | 2002 debug_visitor_->OnConnectionClosed(error, error_details, source); |
| 2003 } | 2003 } |
| 2004 // Cancel the alarms so they don't trigger any action now that the | 2004 // Cancel the alarms so they don't trigger any action now that the |
| 2005 // connection is closed. | 2005 // connection is closed. |
| 2006 CancelAllAlarms(); | 2006 CancelAllAlarms(); |
| 2007 } | 2007 } |
| 2008 | 2008 |
| 2009 void QuicConnection::CancelAllAlarms() { | 2009 void QuicConnection::CancelAllAlarms() { |
| 2010 DVLOG(1) << "Cancelling all QuicConnection alarms."; |
| 2011 |
| 2010 ack_alarm_->Cancel(); | 2012 ack_alarm_->Cancel(); |
| 2011 ping_alarm_->Cancel(); | 2013 ping_alarm_->Cancel(); |
| 2012 resume_writes_alarm_->Cancel(); | 2014 resume_writes_alarm_->Cancel(); |
| 2013 retransmission_alarm_->Cancel(); | 2015 retransmission_alarm_->Cancel(); |
| 2014 send_alarm_->Cancel(); | 2016 send_alarm_->Cancel(); |
| 2015 timeout_alarm_->Cancel(); | 2017 timeout_alarm_->Cancel(); |
| 2016 mtu_discovery_alarm_->Cancel(); | 2018 mtu_discovery_alarm_->Cancel(); |
| 2017 } | 2019 } |
| 2018 | 2020 |
| 2019 void QuicConnection::SendGoAway(QuicErrorCode error, | 2021 void QuicConnection::SendGoAway(QuicErrorCode error, |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2464 | 2466 |
| 2465 void QuicConnection::CheckIfApplicationLimited() { | 2467 void QuicConnection::CheckIfApplicationLimited() { |
| 2466 if (queued_packets_.empty() && | 2468 if (queued_packets_.empty() && |
| 2467 !sent_packet_manager_->HasPendingRetransmissions() && | 2469 !sent_packet_manager_->HasPendingRetransmissions() && |
| 2468 !visitor_->WillingAndAbleToWrite()) { | 2470 !visitor_->WillingAndAbleToWrite()) { |
| 2469 sent_packet_manager_->OnApplicationLimited(); | 2471 sent_packet_manager_->OnApplicationLimited(); |
| 2470 } | 2472 } |
| 2471 } | 2473 } |
| 2472 | 2474 |
| 2473 } // namespace net | 2475 } // namespace net |
| OLD | NEW |