trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject [trafficserver] branch master updated: Rewrite the assert statement to avoid Socks Proxy triggering the assertions.
Date Sun, 05 May 2019 08:45:05 GMT
This is an automated email from the ASF dual-hosted git repository.

oknet 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 c934b15  Rewrite the assert statement to avoid Socks Proxy triggering the assertions.
c934b15 is described below

commit c934b15aa817088bf18d724e01ba2bec3308f9cf
Author: Oknet Xu <xuchao@skyguard.com.cn>
AuthorDate: Tue Apr 30 14:17:03 2019 +0800

    Rewrite the assert statement to avoid Socks Proxy triggering the assertions.
---
 proxy/http/HttpSM.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index a01a120..0563084 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1728,7 +1728,10 @@ HttpSM::state_http_server_open(int event, void *data)
     netvc = static_cast<NetVConnection *>(data);
     session->attach_hostname(t_state.current.server->name);
     UnixNetVConnection *vc = static_cast<UnixNetVConnection *>(data);
-    ink_release_assert(pending_action == nullptr || pending_action == vc->get_action());
+    // Since the UnixNetVConnection::action_ or SocksEntry::action_ may be returned from
netProcessor.connect_re, and the
+    // SocksEntry::action_ will be copied into UnixNetVConnection::action_ before call back
NET_EVENT_OPEN from SocksEntry::free(),
+    // so we just compare the Continuation between pending_action and VC's action_.
+    ink_release_assert(pending_action == nullptr || pending_action->continuation == vc->get_action()->continuation);
     pending_action = nullptr;
 
     session->new_connection(vc);


Mime
View raw message