bneradt commented on a change in pull request #6931:
URL: https://github.com/apache/trafficserver/pull/6931#discussion_r443690300



##########
File path: src/traffic_server/traffic_server.cc
##########
@@ -737,6 +743,9 @@ CB_After_Cache_Init()
     hook->invoke(TS_EVENT_LIFECYCLE_CACHE_READY, nullptr);
     hook = hook->next();
   }
+  if (ports_are_open) {
+    Note("traffic server initialized");
+  }
 }

Review comment:
       Yes, that is possible that the ports are not open when this callback is 
called, but the callback doesn't need to be called multiple times. In fact it 
will be the case that the ports will not have been opened when 
CB_After_Cache_Init is called whenever wait_for_cache is enabled. But in those 
cases we will set ports_are_open to true once we call start_HttpProxyServer in 
that callback.
   
   In other words, ports_are_open is set to true in the two places we call 
start_HttpProxyServer:
   
   1. In main if wait_for_cache is not set.
   1. In CB_After_Cache_Init if wait_for_cache was set by the user, indicated 
they don't want the ports open until the cache is initialized.
   
   So ports_are_open will have to be set in either of those two places.




----------------------------------------------------------------
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.

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


Reply via email to