mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Fix resume saving on shutdown
This commit is contained in:
parent
7ed2d7c87a
commit
c668a59a82
1 changed files with 9 additions and 6 deletions
|
@ -193,12 +193,15 @@ class TorrentManager(component.Component):
|
|||
self.shutdown_torrent_pause_list.append(key)
|
||||
# We have to wait for all torrents to pause and write their resume data
|
||||
wait = True
|
||||
while self.shutdown_torrent_pause_list or wait:
|
||||
wait = False
|
||||
for torrent in self.torrents.values():
|
||||
if torrent.waiting_on_resume_data:
|
||||
wait = True
|
||||
break
|
||||
while wait:
|
||||
if self.shutdown_torrent_pause_list:
|
||||
wait = True
|
||||
else:
|
||||
wait = False
|
||||
for torrent in self.torrents.values():
|
||||
if torrent.waiting_on_resume_data:
|
||||
wait = True
|
||||
break
|
||||
|
||||
time.sleep(0.01)
|
||||
# Wait for all alerts
|
||||
|
|
Loading…
Add table
Reference in a new issue