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/10/03 20:11:14 UTC

[trafficserver] branch 8.1.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 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


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

commit 3eab13563cb7ad0dcd8cf69835d2e7bc6dee05ac
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;