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

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new b696e08  Acquire mutex lock of Http2Stream before starting new 
transaction
b696e08 is described below

commit b696e08ea0284897618ef87b5a33b14899272109
Author: Masaori Koshiba <[email protected]>
AuthorDate: Fri Apr 20 11:35:40 2018 +0900

    Acquire mutex lock of Http2Stream before starting new transaction
    
    (cherry picked from commit 8a0129b6668ca676c8f6d8f35484991df56afda1)
---
 proxy/http2/Http2ConnectionState.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/proxy/http2/Http2ConnectionState.cc 
b/proxy/http2/Http2ConnectionState.cc
index a83914d..e45e624 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -336,6 +336,7 @@ rcv_headers_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
 
     // Set up the State Machine
     if (!empty_request) {
+      SCOPED_MUTEX_LOCK(stream_lock, stream->mutex, this_ethread());
       stream->new_transaction();
       // Send request header to SM
       stream->send_request(cstate);
@@ -810,6 +811,7 @@ rcv_continuation_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
     }
 
     // Set up the State Machine
+    SCOPED_MUTEX_LOCK(stream_lock, stream->mutex, this_ethread());
     stream->new_transaction();
     // Send request header to SM
     stream->send_request(cstate);
@@ -1562,6 +1564,8 @@ Http2ConnectionState::send_push_promise_frame(Http2Stream 
*stream, URL &url, con
     h2_hdr.destroy();
     return;
   }
+
+  SCOPED_MUTEX_LOCK(stream_lock, stream->mutex, this_ethread());
   if (Http2::stream_priority_enabled) {
     Http2DependencyTree::Node *node = this->dependency_tree->find(id);
     if (node != nullptr) {

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to