Fast resume doesn't check if the client terminated correctly
Bug #362840 reported by
Steve Dodier-Lazaro
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RezTorrent |
Fix Released
|
Low
|
Steve Dodier-Lazaro |
Bug Description
The fast resume mode, that reads the bitfield from a cache file instead of checking the sha1sums, should at least verify that the file/folder exists in the download path, and that the client terminated correctly (thus that the bitfield is likely to be up-to-date).
Idea of mecanism for checking for the client :
When the client is launched, it checks for a .lastsession empty file. If it exists, it destroys the file and sets an initFlags_
When the client quits, the last thing it does is creating the .lastsession file, after saving the bitfields and closing the connections, assuming it will terminate well from there.
Changed in reztorrent: | |
assignee: | nobody → sidi |
importance: | Undecided → Low |
milestone: | none → release |
status: | New → In Progress |
Changed in reztorrent: | |
status: | In Progress → Fix Committed |
Changed in reztorrent: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
We can also just delete the .bitfield files after they're read, thus if we don't save them at the end of the client, we'll have to calculate the bitfields. Safer this way.