From 616875d0d2ba61dfa3f6b99ffb0fcdb5ee1cb9ed Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 5 Oct 2020 22:04:58 +0200 Subject: [PATCH] Log when sending message to primary instance fails --- src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5591ca352..de29ac7c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -150,7 +150,9 @@ int main(int argc, char* argv[]) { if (options.is_empty()) { qLog(Info) << "Strawberry is already running - activating existing window (1)"; } - core_app.sendMessage(options.Serialize(), 5000); + if (!core_app.sendMessage(options.Serialize(), 5000)) { + qLog(Error) << "Could not send message to primary instance."; + } return 0; } } @@ -180,7 +182,9 @@ int main(int argc, char* argv[]) { if (options.is_empty()) { qLog(Info) << "Strawberry is already running - activating existing window (2)"; } - a.sendMessage(options.Serialize(), 5000); + if (!a.sendMessage(options.Serialize(), 5000)) { + qLog(Error) << "Could not send message to primary instance."; + } return 0; }