Bug 1400554 - Cancel a time in TLSFilterTransaction if transaction is canceled. r=mcmanus, a=ritu
authorDragana Damjanovic <dd.mozilla@gmail.com>
Mon, 09 Oct 2017 14:59:32 -0400
changeset 432327 b71429f5363a
parent 432326 b0466dd6b31a
child 432328 19123c83cb42
push id7930
push userryanvm@gmail.com
push dateMon, 09 Oct 2017 19:21:46 +0000
treeherdermozilla-beta@b92b69f3503e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, ritu
bugs1400554
milestone57.0
Bug 1400554 - Cancel a time in TLSFilterTransaction if transaction is canceled. r=mcmanus, a=ritu
netwerk/protocol/http/TunnelUtils.cpp
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -121,16 +121,20 @@ TLSFilterTransaction::Cleanup()
 
 void
 TLSFilterTransaction::Close(nsresult aReason)
 {
   if (!mTransaction) {
     return;
   }
 
+  if (mTimer) {
+    mTimer->Cancel();
+    mTimer = nullptr;
+  }
   mTransaction->Close(aReason);
   mTransaction = nullptr;
 }
 
 nsresult
 TLSFilterTransaction::OnReadSegment(const char *aData,
                                     uint32_t aCount,
                                     uint32_t *outCountRead)