From 3045d7007137156a5616e7ecc00c89b52e8ee0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20W=C3=B6ste?= Date: Fri, 22 Dec 2017 12:39:29 +0100 Subject: [PATCH] Make VIPER not quit again --- src/main/java/de/imi/marw/viper/main/Main.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/imi/marw/viper/main/Main.java b/src/main/java/de/imi/marw/viper/main/Main.java index 5b2866e..339de73 100644 --- a/src/main/java/de/imi/marw/viper/main/Main.java +++ b/src/main/java/de/imi/marw/viper/main/Main.java @@ -70,14 +70,16 @@ public static void main(String[] args) { } catch (FileNotFoundException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); System.err.println("[ERROR] File not found. Make sure your configuration paths are set correctly."); + + if (server != null) { + server.stop(); + } } catch (IOException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); - } finally { if (server != null) { server.stop(); } - } } }