mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +00:00
Fix fastresume saving on shutdown
This commit is contained in:
parent
587edbb0b0
commit
42ca7b97bd
1 changed files with 1 additions and 2 deletions
|
@ -179,7 +179,6 @@ class TorrentManager(component.Component):
|
||||||
# Save state on shutdown
|
# Save state on shutdown
|
||||||
self.save_state()
|
self.save_state()
|
||||||
|
|
||||||
component.pause("AlertManager")
|
|
||||||
for key in self.torrents.keys():
|
for key in self.torrents.keys():
|
||||||
if not self.torrents[key].handle.is_paused():
|
if not self.torrents[key].handle.is_paused():
|
||||||
# We set auto_managed false to prevent lt from resuming the torrent
|
# We set auto_managed false to prevent lt from resuming the torrent
|
||||||
|
@ -188,7 +187,7 @@ class TorrentManager(component.Component):
|
||||||
self.shutdown_torrent_pause_list.append(key)
|
self.shutdown_torrent_pause_list.append(key)
|
||||||
# We have to wait for all torrents to pause and write their resume data
|
# We have to wait for all torrents to pause and write their resume data
|
||||||
wait = True
|
wait = True
|
||||||
while self.shutdown_torrent_pause_list and wait:
|
while self.shutdown_torrent_pause_list or wait:
|
||||||
wait = False
|
wait = False
|
||||||
for torrent in self.torrents.values():
|
for torrent in self.torrents.values():
|
||||||
if torrent.waiting_on_resume_data:
|
if torrent.waiting_on_resume_data:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue