diff --git a/main/launcher/src/main/java/org/cryptomator/launcher/Cryptomator.java b/main/launcher/src/main/java/org/cryptomator/launcher/Cryptomator.java index 17b1096e5..5daa2cc91 100644 --- a/main/launcher/src/main/java/org/cryptomator/launcher/Cryptomator.java +++ b/main/launcher/src/main/java/org/cryptomator/launcher/Cryptomator.java @@ -17,7 +17,7 @@ public class Cryptomator { private static final Logger LOG = LoggerFactory.getLogger(Cryptomator.class); static final BlockingQueue FILE_OPEN_REQUESTS = new ArrayBlockingQueue<>(10); - public static void main(String[] args) throws IOException { + public static void main(String[] args) { LOG.info("Starting Cryptomator {} on {} {} ({})", ApplicationVersion.orElse("SNAPSHOT"), SystemUtils.OS_NAME, SystemUtils.OS_VERSION, SystemUtils.OS_ARCH); FileOpenRequestHandler fileOpenRequestHandler = new FileOpenRequestHandler(FILE_OPEN_REQUESTS); @@ -30,6 +30,8 @@ public class Cryptomator { communicator.handleLaunchArgs(args); LOG.info("Found running application instance. Shutting down."); } + } catch (IOException e) { + LOG.error("Failed to initiate inter-process communication.", e); } System.exit(0); // end remaining non-daemon threads. } diff --git a/main/launcher/src/main/java/org/cryptomator/launcher/InterProcessCommunicator.java b/main/launcher/src/main/java/org/cryptomator/launcher/InterProcessCommunicator.java index a021067c0..e0b3af685 100644 --- a/main/launcher/src/main/java/org/cryptomator/launcher/InterProcessCommunicator.java +++ b/main/launcher/src/main/java/org/cryptomator/launcher/InterProcessCommunicator.java @@ -12,7 +12,6 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.rmi.ConnectException; -import java.rmi.NoSuchObjectException; import java.rmi.NotBoundException; import java.rmi.Remote; import java.rmi.RemoteException; @@ -113,7 +112,7 @@ abstract class InterProcessCommunicator implements InterProcessCommunicationProt } @Override - public void close() throws IOException { + public void close() { // no-op } @@ -150,14 +149,14 @@ abstract class InterProcessCommunicator implements InterProcessCommunicationProt } @Override - public void close() throws IOException { + public void close() { try { registry.unbind(RMI_NAME); UnicastRemoteObject.unexportObject(remote, true); socket.close(); LOG.debug("Server shut down."); - } catch (NotBoundException | NoSuchObjectException e) { - // ignore + } catch (NotBoundException | IOException e) { + LOG.warn("Failed to close IPC Server.", e); } }