From cb21b7d053ab35f61e8316853f57ec1ce121e484 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 18 Sep 2017 18:34:28 +0200 Subject: Only processPendingCommandQueue once and send secret command after that. We run into a crash otherwise when creating the first account.. --- common/resourceaccess.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 5ed3609..a3478e6 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp @@ -500,16 +500,13 @@ void ResourceAccess::connected() Commands::write(d->socket.data(), ++d->messageId, Commands::HandshakeCommand, fbb); } + // Reenqueue pending commands, we failed to send them + processPendingCommandQueue(); auto secret = SecretStore::instance().resourceSecret(d->resourceInstanceIdentifier); if (!secret.isEmpty()) { sendSecret(secret).exec(); } - // Reenqueue pending commands, we failed to send them - processPendingCommandQueue(); - // Send queued commands - processCommandQueue(); - emit ready(true); } -- cgit v1.2.3