trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From masa...@apache.org
Subject [trafficserver] branch quic-latest updated: Cancel scheduled loss_detection_alarm on destructor
Date Thu, 29 Mar 2018 00:35:41 GMT
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 2ca74d8  Cancel scheduled loss_detection_alarm on destructor
2ca74d8 is described below

commit 2ca74d875c4bb2dce21e7973cf1205a7b4dab8f9
Author: Masaori Koshiba <masaori@apache.org>
AuthorDate: Thu Mar 29 09:32:55 2018 +0900

    Cancel scheduled loss_detection_alarm on destructor
    
    Fix test_QUICLossDetector crash.
---
 iocore/net/quic/QUICLossDetector.cc | 7 +++++++
 iocore/net/quic/QUICLossDetector.h  | 1 +
 2 files changed, 8 insertions(+)

diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index 0142b75..22823de 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -59,6 +59,13 @@ QUICLossDetector::QUICLossDetector(QUICPacketTransmitter *transmitter,
QUICConge
   SET_HANDLER(&QUICLossDetector::event_handler);
 }
 
+QUICLossDetector::~QUICLossDetector()
+{
+  if (this->_loss_detection_alarm) {
+    this->_loss_detection_alarm->cancel();
+  }
+}
+
 int
 QUICLossDetector::event_handler(int event, Event *edata)
 {
diff --git a/iocore/net/quic/QUICLossDetector.h b/iocore/net/quic/QUICLossDetector.h
index d6b1262..7a34d89 100644
--- a/iocore/net/quic/QUICLossDetector.h
+++ b/iocore/net/quic/QUICLossDetector.h
@@ -69,6 +69,7 @@ class QUICLossDetector : public Continuation, public QUICFrameHandler
 {
 public:
   QUICLossDetector(QUICPacketTransmitter *transmitter, QUICCongestionController *cc);
+  ~QUICLossDetector();
 
   int event_handler(int event, Event *edata);
 

-- 
To stop receiving notification emails like this one, please contact
masaori@apache.org.

Mime
View raw message