You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ga...@apache.org on 2018/03/07 22:08:04 UTC
[trafficserver] branch master updated: s3_auth: check if previous
config (re)load failed
This is an automated email from the ASF dual-hosted git repository.
gancho 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 20db74b s3_auth: check if previous config (re)load failed
20db74b is described below
commit 20db74bc0d0bf8e2d83e2c92a83274bb713196c7
Author: Gancho Tenev <ga...@apache.org>
AuthorDate: Wed Mar 7 13:08:52 2018 -0800
s3_auth: check if previous config (re)load failed
before releasing the old configuration
---
plugins/s3_auth/s3_auth.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/plugins/s3_auth/s3_auth.cc b/plugins/s3_auth/s3_auth.cc
index bd007df..3b21bbd 100644
--- a/plugins/s3_auth/s3_auth.cc
+++ b/plugins/s3_auth/s3_auth.cc
@@ -495,7 +495,10 @@ ConfigCache::get(const char *fname)
TSDebug(PLUGIN_NAME, "Configuration from %s is stale, reloading", config_fname.c_str());
it->second.second = tv.tv_sec;
- it->second.first->release();
+ if (nullptr != it->second.first) {
+ // The previous config update / reload attempt did not fail, safe to call release.
+ it->second.first->release();
+ }
if (s3->parse_config(config_fname)) {
it->second.first = s3;
} else {
--
To stop receiving notification emails like this one, please contact
gancho@apache.org.