Prevent multiple session refreshes from being enqueued

This commit is contained in:
Vladimir Golovnev 2022-08-01 08:14:09 +03:00 committed by GitHub
parent ef297dd8e6
commit 6d1573f901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1122,8 +1122,12 @@ void Session::prepareStartup()
QMetaObject::invokeMethod(this, [this, context]() { handleLoadedResumeData(context); }, Qt::QueuedConnection);
context->isLoadedResumeDataHandlingEnqueued = true;
}
m_nativeSession->post_torrent_updates();
m_refreshEnqueued = true;
if (!m_refreshEnqueued)
{
m_nativeSession->post_torrent_updates();
m_refreshEnqueued = true;
}
});
context->startupStorage->loadAll();