final String secondary = server.getSecondary();
log.info("trying primary server login " + primary);
/* Attempt to connect and login to primary server */
final DDF_FeedEvent eventOne = login(primary, PORT);
if (eventOne == DDF_FeedEvent.LOGIN_SENT) {
log.info("Posting LOGIN_SENT for primary server");
postEvent(DDF_FeedEvent.LOGIN_SENT);
isLoggingIn = false;
return;
}
log.warn("failed to connect to primary server " + primary);
log.warn("trying secondary server login " + secondary);
/* Attempt to connect and login to secondary server */
final DDF_FeedEvent eventTwo = login(secondary, PORT);
if (eventTwo == DDF_FeedEvent.LOGIN_SENT) {
log.info("Posting LOGIN_SENT for secondary server");
postEvent(DDF_FeedEvent.LOGIN_SENT);
isLoggingIn = false;