From f5431e805eb4513883f7df42de0a51a410535d27 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Mon, 5 Mar 2018 06:36:47 +0100 Subject: [PATCH] Don't start the daemon mode if an exception happened earlier. --- .../de/fabianonline/telegram_backup/CommandLineController.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt b/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt index 4286ccd..332f25a 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt @@ -143,6 +143,8 @@ class CommandLineController { } catch (e: Exception) { e.printStackTrace() logger.error("Exception caught!", e) + // If we encountered an exception, we definitely don't want to start the daemon mode now. + CommandLineOptions.cmd_daemon = false } finally { if (CommandLineOptions.cmd_daemon) { handler.activate()