From 47d15d44cc1b8ff83a35b9d104007ed11e3cd546 Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Sat, 14 Oct 2023 09:18:53 +0200 Subject: [PATCH] Give enough time to connect to other instance. When a first instance does not respond below 100 ms a second instance assumes there is no other instance and the socket is a leftover of a crash. This circumstance may happen when session managers autostart but also restore albert from a former session at boot and the first instance is simply to busy loading plugins. --- src/rpcserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index a0ae2bb3..dc6ff2af 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -50,7 +50,7 @@ RPCServer::RPCServer() DEBG << "Checking for a running instance…"; QLocalSocket socket; socket.connectToServer(socket_path); - if (socket.waitForConnected(100)) { + if (socket.waitForConnected()) { INFO << "There is another instance of albert running."; ::exit(2); } else {