mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-21 16:46:18 +00:00
Save session data once on shutdown, before waiting for stopped announces
Write it after downloads stop, or after the loop if skipped; one error policy for saves.
This commit is contained in:
+5
-1
@@ -489,7 +489,11 @@ main(int argc, char** argv) {
|
||||
|
||||
torrent::system::Thread::self()->event_loop();
|
||||
|
||||
control->core()->download_list()->session_save();
|
||||
// A quick shutdown with no tracker request pending leaves the loop before
|
||||
// handle_shutdown() could save.
|
||||
if (!control->is_shutdown_session_saved())
|
||||
control->core()->download_list()->session_save();
|
||||
|
||||
control->cleanup();
|
||||
|
||||
} catch (torrent::internal_error& e) {
|
||||
|
||||
Reference in New Issue
Block a user