NIFI-51 fixed if/else logic/order

This commit is contained in:
joewitt 2014-12-23 15:12:37 -05:00
parent 1374d1db7c
commit c394454157
1 changed files with 4 additions and 3 deletions

View File

@ -447,10 +447,11 @@ public class FlowController implements EventAccess, ControllerServiceProvider, H
rootGroup.setName(DEFAULT_ROOT_GROUP_NAME);
instanceId = UUID.randomUUID().toString();
if (Boolean.TRUE.equals(isSiteToSiteSecure) && sslContext == null) {
LOG.error("Unable to create Secure Site-to-Site Listener because not all required Keystore/Truststore Properties are set. Site-to-Site functionality will be disabled until this problem is has been fixed.");
if (remoteInputSocketPort == null){
LOG.info("Not enabling Site-to-Site functionality because nifi.remote.input.socket.port is not set");
externalSiteListener = null;
} else if (remoteInputSocketPort == null) {
} else if (isSiteToSiteSecure && sslContext == null) {
LOG.error("Unable to create Secure Site-to-Site Listener because not all required Keystore/Truststore Properties are set. Site-to-Site functionality will be disabled until this problem is has been fixed.");
externalSiteListener = null;
} else {
// Register the SocketFlowFileServerProtocol as the appropriate resource for site-to-site Server Protocol