From 69be23c5f629884465dec98efcb9d5a2678b4df5 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Fri, 18 Nov 2016 16:04:08 +0100 Subject: GH-1726 better failure detection for updates Instead of just checking if the new version started, make sure it is able to write its IPC key to a file and then use the key to connect to the process. --- application/main.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'application/main.cpp') diff --git a/application/main.cpp b/application/main.cpp index 61771f6e..0fd9f089 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -4,8 +4,30 @@ #include #include +// #define BREAK_INFINITE_LOOP +// #define BREAK_EXCEPTION +// #define BREAK_RETURN + +#ifdef BREAK_INFINITE_LOOP +#include +#include +#endif + int main(int argc, char *argv[]) { +#ifdef BREAK_INFINITE_LOOP + while(true) + { + std::this_thread::sleep_for(std::chrono::milliseconds(250)); + } +#endif +#ifdef BREAK_EXCEPTION + throw 42; +#endif +#ifdef BREAK_RETURN + return 42; +#endif + // initialize Qt MultiMC app(argc, argv); -- cgit