mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-06 17:38:06 +00:00
fix(queue): order seed permit release before visibility
- Keep a resumed seeder marked as starting until its download permit is released. - Prevent Linux scheduling from exposing an inconsistent seed lifecycle to observers. - Preserve the existing strict regression assertion.
This commit is contained in:
@@ -1194,9 +1194,12 @@ impl<R: tauri::Runtime> QueueManager<R> {
|
||||
self.abandon_seed_start(&id);
|
||||
return;
|
||||
}
|
||||
self.finish_seed_start(&id);
|
||||
self.record_seed_started(&id).await;
|
||||
// Keep the lifecycle visibly in the starting state until its
|
||||
// download permit has been released. Otherwise observers can
|
||||
// see a resumed seeder before the permit transition finishes.
|
||||
self.release_download_permit_for_seed(&id).await;
|
||||
self.finish_seed_start(&id);
|
||||
self.emit_state(&id, DownloadStatus::Seeding);
|
||||
}
|
||||
Ok(Aria2SeedControlOutcome::Complete) => {
|
||||
|
||||
Reference in New Issue
Block a user