rawlinp closed pull request #294: [TC-157] router fail to restart due to failed 
to get SSL keys
URL: https://github.com/apache/trafficcontrol/pull/294
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/secure/CertificatesClient.java
 
b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/secure/CertificatesClient.java
index ae4525d94..f2585dade 100644
--- 
a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/secure/CertificatesClient.java
+++ 
b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/secure/CertificatesClient.java
@@ -43,6 +43,9 @@
 
                while (status != HttpURLConnection.HTTP_NOT_MODIFIED && status 
!= HttpURLConnection.HTTP_OK) {
                        
trafficRouterManager.trackEvent("lastHttpsCertificatesFetchFail");
+                       if (shutdown){
+                               return null;
+                       }
                        try {
                                
Thread.sleep(trafficOpsUtils.getConfigLongValue("certificates.retry.interval", 
30 * 1000L));
                        } catch (InterruptedException e) {
@@ -69,6 +72,9 @@
        public int fetchRawData(final StringBuilder stringBuilder) {
                while (trafficOpsUtils == null || trafficOpsUtils.getHostname() 
== null || trafficOpsUtils.getHostname().isEmpty()) {
                        LOGGER.error("No traffic ops hostname yet!");
+                       if (shutdown) {
+                               return -1;
+                       }
                        try {
                                Thread.sleep(5000L);
                        } catch (Exception e) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to