You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/08/29 16:25:09 UTC

[trafficserver] branch 9.0.x updated: slice: check if vio is still valid before calling TSVIODone* on shutdown (#7147)

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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new a3f1c7e  slice: check if vio is still valid before calling TSVIODone* on shutdown (#7147)
a3f1c7e is described below

commit a3f1c7e641cf5f68baa16ca8372e37ca8eb72a3f
Author: Brian Olsen <bn...@gmail.com>
AuthorDate: Fri Aug 28 16:26:38 2020 -0600

    slice: check if vio is still valid before calling TSVIODone* on shutdown (#7147)
    
    (cherry picked from commit c8c9540b04b08d04bd44f6b8c7aa5d75d4a9e1a8)
---
 plugins/experimental/slice/Stage.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/experimental/slice/Stage.h b/plugins/experimental/slice/Stage.h
index f677d64..a2d7c4f 100644
--- a/plugins/experimental/slice/Stage.h
+++ b/plugins/experimental/slice/Stage.h
@@ -52,7 +52,9 @@ struct Channel {
       int64_t const avail = TSIOBufferReaderAvail(m_reader);
       TSIOBufferReaderConsume(m_reader, avail);
       consumed = avail;
-      TSVIONDoneSet(m_vio, TSVIONDoneGet(m_vio) + consumed);
+      if (nullptr != m_vio) {
+        TSVIONDoneSet(m_vio, TSVIONDoneGet(m_vio) + consumed);
+      }
     }
 
     return consumed;