mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 03:39:39 +03:00
Revert "Guard the flag used for deferred session configure." (#6733)
This reverts commit 5cbc7b16c0
.
This commit is contained in:
parent
7bc81ead8c
commit
c1e3e2a745
2 changed files with 4 additions and 12 deletions
|
@ -873,9 +873,6 @@ void Session::adjustLimits()
|
||||||
void Session::configure()
|
void Session::configure()
|
||||||
{
|
{
|
||||||
qDebug("Configuring session");
|
qDebug("Configuring session");
|
||||||
if (!m_deferredConfigureScheduled) return; // Obtaining the lock is expensive, let's check early
|
|
||||||
QWriteLocker locker(&m_lock);
|
|
||||||
if (!m_deferredConfigureScheduled) return; // something might have changed while we were getting the lock
|
|
||||||
#if LIBTORRENT_VERSION_NUM < 10100
|
#if LIBTORRENT_VERSION_NUM < 10100
|
||||||
libt::session_settings sessionSettings = m_nativeSession->settings();
|
libt::session_settings sessionSettings = m_nativeSession->settings();
|
||||||
configure(sessionSettings);
|
configure(sessionSettings);
|
||||||
|
@ -3029,13 +3026,11 @@ void Session::initResumeFolder()
|
||||||
|
|
||||||
void Session::configureDeferred()
|
void Session::configureDeferred()
|
||||||
{
|
{
|
||||||
if (m_deferredConfigureScheduled) return; // Obtaining the lock is expensive, let's check early
|
if (!m_deferredConfigureScheduled) {
|
||||||
QWriteLocker locker(&m_lock);
|
|
||||||
if (m_deferredConfigureScheduled) return; // something might have changed while we were getting the lock
|
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "configure", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, "configure", Qt::QueuedConnection);
|
||||||
m_deferredConfigureScheduled = true;
|
m_deferredConfigureScheduled = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Enable IP Filtering
|
// Enable IP Filtering
|
||||||
// this method creates ban list from scratch combining user ban list and 3rd party ban list file
|
// this method creates ban list from scratch combining user ban list and 3rd party ban list file
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#endif
|
#endif
|
||||||
#include <QNetworkConfigurationManager>
|
#include <QNetworkConfigurationManager>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QReadWriteLock>
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
|
@ -603,8 +602,6 @@ namespace BitTorrent
|
||||||
|
|
||||||
QNetworkConfigurationManager m_networkManager;
|
QNetworkConfigurationManager m_networkManager;
|
||||||
|
|
||||||
mutable QReadWriteLock m_lock;
|
|
||||||
|
|
||||||
static Session *m_instance;
|
static Session *m_instance;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue