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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
     new acdc131e6c check if client response is still valid on txn close 
(#11827)
acdc131e6c is described below

commit acdc131e6cfcb5441376d868824fd82c825c176c
Author: Nathan Wang <[email protected]>
AuthorDate: Thu Oct 24 08:36:30 2024 -0700

    check if client response is still valid on txn close (#11827)
    
    Co-authored-by: Nathan Wang <[email protected]>
    (cherry picked from commit df63f54bfeeaefcb6af46911502203681295ff4c)
---
 src/cripts/Bundles/LogsMetrics.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/cripts/Bundles/LogsMetrics.cc 
b/src/cripts/Bundles/LogsMetrics.cc
index 9a90cd1c48..cc1b34193b 100644
--- a/src/cripts/Bundles/LogsMetrics.cc
+++ b/src/cripts/Bundles/LogsMetrics.cc
@@ -100,6 +100,12 @@ LogsMetrics::doTxnClose(cripts::Context *context)
 {
   borrow resp = cripts::Client::Response::Get();
 
+  // It's possible that the client response here is not valid, because the 
client went
+  // away prematurely.
+  if (!resp.Initialized()) {
+    return;
+  }
+
   // .tcpinfo(bool)
   if (_tcpinfo && control.logging.Get()) {
     borrow conn = cripts::Client::Connection::Get();

Reply via email to