diff options
Diffstat (limited to 'same')
-rw-r--r-- | same/src/main/java/com/orbekk/same/ClientApp.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/same/src/main/java/com/orbekk/same/ClientApp.java b/same/src/main/java/com/orbekk/same/ClientApp.java index b8b6730..3c67ae2 100644 --- a/same/src/main/java/com/orbekk/same/ClientApp.java +++ b/same/src/main/java/com/orbekk/same/ClientApp.java @@ -53,12 +53,14 @@ public class ClientApp { public void run(int port, String networkName, String masterUrl) { - getClient(port, networkName, masterUrl); + SameController controller = SameController.create(port); try { - server.join(); - } catch (InterruptedException e) { - logger.warn("Interrupted.", e); + controller.start(); + } catch (Exception e) { + logger.error("Failed to start Same", e); } + controller.joinNetwork(masterUrl); + controller.join(); } public static void main(String[] args) { |