diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-18 18:34:28 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-18 18:34:28 +0200 |
commit | cb21b7d053ab35f61e8316853f57ec1ce121e484 (patch) | |
tree | 1e211207157a82efa6eda710843143c048cc838a /common | |
parent | 6fdd6aa9d444219842efa0e6b82a32b887cb8336 (diff) | |
download | sink-cb21b7d053ab35f61e8316853f57ec1ce121e484.tar.gz sink-cb21b7d053ab35f61e8316853f57ec1ce121e484.zip |
Only processPendingCommandQueue once and send secret command after that.
We run into a crash otherwise when creating the first account..
Diffstat (limited to 'common')
-rw-r--r-- | common/resourceaccess.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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() | |||
500 | Commands::write(d->socket.data(), ++d->messageId, Commands::HandshakeCommand, fbb); | 500 | Commands::write(d->socket.data(), ++d->messageId, Commands::HandshakeCommand, fbb); |
501 | } | 501 | } |
502 | 502 | ||
503 | // Reenqueue pending commands, we failed to send them | ||
504 | processPendingCommandQueue(); | ||
503 | auto secret = SecretStore::instance().resourceSecret(d->resourceInstanceIdentifier); | 505 | auto secret = SecretStore::instance().resourceSecret(d->resourceInstanceIdentifier); |
504 | if (!secret.isEmpty()) { | 506 | if (!secret.isEmpty()) { |
505 | sendSecret(secret).exec(); | 507 | sendSecret(secret).exec(); |
506 | } | 508 | } |
507 | 509 | ||
508 | // Reenqueue pending commands, we failed to send them | ||
509 | processPendingCommandQueue(); | ||
510 | // Send queued commands | ||
511 | processCommandQueue(); | ||
512 | |||
513 | emit ready(true); | 510 | emit ready(true); |
514 | } | 511 | } |
515 | 512 | ||