You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/03/02 01:15:42 UTC

[trafficserver] branch master updated: Free Http2Stream directly when HttpSM is already gone or not allocated

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 469ccb4  Free Http2Stream directly when HttpSM is already gone or not allocated
469ccb4 is described below

commit 469ccb4fd02a9a53d86703abf1c12e710cdd9819
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Feb 28 14:57:26 2018 +0900

    Free Http2Stream directly when HttpSM is already gone or not allocated
    
    When Http2Stream get error before it start transaction, Http2Stream::transaction_done() is never called.
    Because HttpSM is not allocated. In regular cases, Http2Stream::initiating_close() signal some events
    to HttpSM, but in above case it should free itself directly.
---
 proxy/http2/Http2Stream.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 120b2b1..1965324 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -436,8 +436,9 @@ Http2Stream::initiating_close()
       SCOPED_MUTEX_LOCK(lock, current_reader->mutex, this_ethread());
       current_reader->handleEvent(VC_EVENT_ERROR);
     } else if (!sent_write_complete) {
-      // Transaction is already gone.  Kill yourself
+      // Transaction is already gone or not started. Kill yourself
       do_io_close();
+      destroy();
     }
   }
 }

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