You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2019/11/21 18:30:33 UTC
[trafficserver] branch master updated: Move logging before session
could be freed
This is an automated email from the ASF dual-hosted git repository.
shinrich 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 c44e0dc Move logging before session could be freed
c44e0dc is described below
commit c44e0dc7da64186b6954bb08dc793eb00248c1ca
Author: Susan Hinrichs <sh...@oath.com>
AuthorDate: Mon Nov 18 21:59:35 2019 +0000
Move logging before session could be freed
---
proxy/http/HttpSM.cc | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 8a18996..4672df6 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -6865,6 +6865,23 @@ HttpSM::kill_this()
update_stats();
}
+ //////////////
+ // Log Data //
+ //////////////
+ SMDebug("http_seq", "[HttpSM::update_stats] Logging transaction");
+ if (Log::transaction_logging_enabled() && t_state.api_info.logging_enabled) {
+ LogAccess accessor(this);
+
+ int ret = Log::access(&accessor);
+
+ if (ret & Log::FULL) {
+ SMDebug("http", "[update_stats] Logging system indicates FULL.");
+ }
+ if (ret & Log::FAIL) {
+ Log::error("failed to log transaction for at least one log object");
+ }
+ }
+
if (ua_txn) {
ua_txn->transaction_done();
}
@@ -6883,23 +6900,6 @@ HttpSM::kill_this()
HTTP_SM_SET_DEFAULT_HANDLER(nullptr);
- //////////////
- // Log Data //
- //////////////
- SMDebug("http_seq", "[HttpSM::update_stats] Logging transaction");
- if (Log::transaction_logging_enabled() && t_state.api_info.logging_enabled) {
- LogAccess accessor(this);
-
- int ret = Log::access(&accessor);
-
- if (ret & Log::FULL) {
- SMDebug("http", "[update_stats] Logging system indicates FULL.");
- }
- if (ret & Log::FAIL) {
- Log::error("failed to log transaction for at least one log object");
- }
- }
-
if (redirect_url != nullptr) {
ats_free((void *)redirect_url);
redirect_url = nullptr;