From 9f38374539a0b7820687172422bfa37c4da24cec Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 03:36:55 +0200 Subject: [PATCH] Fix wrong thread call on exite form sys tray --- gui/src/main/java/io/bitsquare/gui/SystemTray.java | 2 +- network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/SystemTray.java b/gui/src/main/java/io/bitsquare/gui/SystemTray.java index b06d3122a97..b21aaec4632 100644 --- a/gui/src/main/java/io/bitsquare/gui/SystemTray.java +++ b/gui/src/main/java/io/bitsquare/gui/SystemTray.java @@ -128,7 +128,7 @@ else if (Utilities.isWindows()) e1.printStackTrace(); } }); - exitItem.addActionListener(e -> onExit.run()); + exitItem.addActionListener(e -> UserThread.execute(onExit::run)); } public void hideStage() { diff --git a/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java b/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java index bc1c65eac77..7a66d1a2f6a 100644 --- a/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java +++ b/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java @@ -5,6 +5,7 @@ import io.bitsquare.app.Version; import io.bitsquare.common.Clock; import io.bitsquare.common.UserThread; +import io.bitsquare.common.util.Utilities; import io.bitsquare.p2p.NodeAddress; import io.bitsquare.p2p.P2PService; import io.bitsquare.p2p.P2PServiceListener; @@ -118,8 +119,11 @@ public void createAndStartP2PService(NodeAddress mySeedNodeAddress, "Bitsquare_seed_node_" + String.valueOf(mySeedNodeAddress.getFullAddress().replace(":", "_"))); String logPath = Paths.get(appPath.toString(), "logs").toString(); - Log.setup(logPath, useDetailedLogging); + Log.setup(logPath); log.info("Log files under: " + logPath); + Version.printVersion(); + Utilities.printSysInfo(); + Log.setLevel(useDetailedLogging); SeedNodesRepository seedNodesRepository = new SeedNodesRepository(); if (progArgSeedNodes != null && !progArgSeedNodes.isEmpty()) {