ywkaras commented on a change in pull request #8208:
URL: https://github.com/apache/trafficserver/pull/8208#discussion_r694985779



##########
File path: iocore/net/SSLSNIConfig.cc
##########
@@ -166,13 +167,19 @@ SNIConfigParams::Initialize()
     return 1;
   }
 
-  ts::Errata zret = Y_sni.loader(sni_filename);
+  YamlSNIConfig Y_sni_tmp;
+  ts::Errata zret = Y_sni_tmp.loader(sni_filename);
   if (!zret.isOK()) {
     std::stringstream errMsg;
     errMsg << zret;
-    Error("%s failed to load: %s", sni_filename, errMsg.str().c_str());
+    if (TSSystemState::is_initializing()) {
+      Emergency("%s failed to load: %s", sni_filename, errMsg.str().c_str());
+    } else {
+      Error("%s failed to load: %s", sni_filename, errMsg.str().c_str());
+    }
     return 1;
   }
+  Y_sni = std::move(Y_sni_tmp);

Review comment:
       I added this logic to make sure the static data remained the coherent, 
old version if an invalid sni.yaml was reloaded.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to