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(); } - } } }