Split Client#onlineInit method up into performHandshake and initReceiver
This commit is contained in:
@ -62,7 +62,7 @@ public class Startup {
|
||||
if (args.length > 0) config.load(args);
|
||||
|
||||
// Check if all mandatory configuration values have been initialized
|
||||
if (!config.isInitialized()) throw new EnvoyException("Server or port are not defined");
|
||||
if (!config.isInitialized()) throw new EnvoyException("Configuration is not fully initialized");
|
||||
} catch (Exception e) {
|
||||
JOptionPane
|
||||
.showMessageDialog(null, "Error loading configuration values:\n" + e.toString(), "Configuration error", JOptionPane.ERROR_MESSAGE);
|
||||
@ -109,7 +109,8 @@ public class Startup {
|
||||
try {
|
||||
// Try entering online mode first
|
||||
localDb.loadIdGenerator();
|
||||
client.onlineInit(credentials, localDb, cache);
|
||||
client.performHandshake(credentials, cache);
|
||||
client.initReceiver(localDb, cache);
|
||||
} catch (Exception e1) {
|
||||
logger.warning("Could not connect to server. Trying offline mode...");
|
||||
e1.printStackTrace();
|
||||
|
Reference in New Issue
Block a user