You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/04/04 15:28:54 UTC
[GitHub] [trafficcontrol] ajschmidt commented on a change in pull request
#3392: Tr default cert
ajschmidt commented on a change in pull request #3392: Tr default cert
URL: https://github.com/apache/trafficcontrol/pull/3392#discussion_r272237236
##########
File path: traffic_router/connector/src/main/java/com/comcast/cdn/traffic_control/traffic_router/secure/CertificateRegistry.java
##########
@@ -37,9 +42,31 @@ private CertificateRegistry() {
}
public static CertificateRegistry getInstance() {
+ synchronized (CertificateRegistryHolder.DELIVERY_SERVICE_CERTIFICATES) {
Review comment:
Yes. I placed this Synchronize here to protect the data structure in the event that more than one thread calls the 'getInstance' method during startup. There are in fact three endpoints being initialized using the LanguidNioProtocol at startup. Once initialized this method never gets called again so they synchronized doesn't have any impact on performance.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services