Skip to content

Commit

Permalink
Give enough time to connect to other instance.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ManuelSchneid3r committed Oct 14, 2023
1 parent 3ea8edc commit 47d15d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpcserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 47d15d4

Please sign in to comment.