Browse Source

- Attempt to speed up exit

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
e460f1c365
  1. 10
      src/bittorrent.cpp

10
src/bittorrent.cpp

@ -108,6 +108,9 @@ Bittorrent::~Bittorrent() {
saveDHTEntry(); saveDHTEntry();
saveSessionState(); saveSessionState();
saveFastResumeData(); saveFastResumeData();
// Delete session
session_proxy sp = s->abort();
delete s;
// Disable directory scanning // Disable directory scanning
disableDirectoryScanning(); disableDirectoryScanning();
// Delete our objects // Delete our objects
@ -125,10 +128,7 @@ Bittorrent::~Bittorrent() {
delete httpServer; delete httpServer;
if(timerETA) if(timerETA)
delete timerETA; delete timerETA;
// Delete BT session qDebug("Deleting session...");
qDebug("Deleting session");
delete s;
qDebug("Session deleted");
} }
void Bittorrent::preAllocateAllFiles(bool b) { void Bittorrent::preAllocateAllFiles(bool b) {
@ -293,6 +293,8 @@ void Bittorrent::configureSession() {
sessionSettings.use_dht_as_fallback = false; sessionSettings.use_dht_as_fallback = false;
// To prevent ISPs from blocking seeding // To prevent ISPs from blocking seeding
sessionSettings.lazy_bitfields = true; sessionSettings.lazy_bitfields = true;
// Speed up exit
sessionSettings.stop_tracker_timeout = 1;
//sessionSettings.announce_to_all_trackers = true; //sessionSettings.announce_to_all_trackers = true;
#ifdef LIBTORRENT_0_15 #ifdef LIBTORRENT_0_15
sessionSettings.announce_to_all_tiers = true; //uTorrent behavior sessionSettings.announce_to_all_tiers = true; //uTorrent behavior

Loading…
Cancel
Save