Thread haproxyThread = new Thread(new Runnable() {
@Override
public void run() {
SimpleHaproxyConfig config = new SimpleHaproxyConfig(secretKeys, defaultHost);
HaproxyInstance instance = new HaproxyInstance(config);
try {
instance.run();
} catch (Exception e) {
log.error("Error during haproxy run; forcing exit", e);
System.exit(1);
}
}
});
haproxyThread.start();
Thread horizonThread = new Thread(new Runnable() {
@Override
public void run() {
HorizonInstance instance = new HorizonInstance(configStore);
try {
instance.run();
} catch (Exception e) {
log.error("Error during horizon run; forcing exit", e);
System.exit(1);
}
}