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

mochen 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 222042413d Fix a broken release assert in HttpSM (#10067)
222042413d is described below

commit 222042413db7d7016314c2ec871cdd61f25e3427
Author: Mo Chen <[email protected]>
AuthorDate: Thu Jul 20 08:47:21 2023 -0500

    Fix a broken release assert in HttpSM (#10067)
    
    ((UnixNetVConnection *)plugin_vc)->nh isn't expected to be nullptr.  It was 
only succeeding by accident.
---
 proxy/http/HttpSM.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 48f3eb0e6e..6abdcd98d9 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -2185,8 +2185,9 @@ HttpSM::add_to_existing_request()
   if (nullptr == ethread->connecting_pool) {
     initialize_thread_for_connecting_pools(ethread);
   }
-  auto my_nh = ((UnixNetVConnection *)(this)->_ua.get_txn()->get_netvc())->nh;
-  ink_release_assert(my_nh == nullptr /* PluginVC */ || my_nh == 
get_NetHandler(this_ethread()));
+  NetVConnection *vc = _ua.get_txn()->get_netvc();
+  ink_assert(dynamic_cast<UnixNetVConnection *>(vc) == nullptr /* PluginVC */ 
||
+             dynamic_cast<UnixNetVConnection *>(vc)->nh == 
get_NetHandler(this_ethread()));
 
   HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_http_server_open);
 

Reply via email to