Browse Source

Fix possible infinite loop in qBtSession constructor (when Web UI is enabled)

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
d8af5d681c
  1. 1
      src/mainwindow.cpp
  2. 2
      src/qtlibtorrent/qbtsession.cpp

1
src/mainwindow.cpp

@ -331,6 +331,7 @@ MainWindow::~MainWindow() { @@ -331,6 +331,7 @@ MainWindow::~MainWindow() {
// Delete BTSession objects
qDebug("Deleting BTSession");
QBtSession::drop();
BTSession = 0;
// May freeze for a few seconds after the next line
// because the Bittorrent session proxy will
// actually be deleted now and destruction

2
src/qtlibtorrent/qbtsession.cpp

@ -139,7 +139,7 @@ QBtSession::QBtSession() @@ -139,7 +139,7 @@ QBtSession::QBtSession()
#endif
connect(m_scanFolders, SIGNAL(torrentsAdded(QStringList&)), this, SLOT(addTorrentsFromScanFolder(QStringList&)));
// Apply user settings to Bittorrent session
configureSession();
QTimer::singleShot(0, this, SLOT(configureSession()));
qDebug("* BTSession constructed");
}

Loading…
Cancel
Save