Merge pull request #254 from Mrreadiness/fix/transactional-pause

Fix: transactional pause
This commit is contained in:
Igor Katson 2024-10-12 19:37:33 +01:00 committed by GitHub
commit 946ad36258
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1365,8 +1365,7 @@ impl Session {
}
pub async fn pause(&self, handle: &ManagedTorrentHandle) -> anyhow::Result<()> {
handle.locked.write().paused = true;
handle.pause()?;
handle.pause().map(|_| handle.locked.write().paused = true)?;
self.try_update_persistence_metadata(handle).await;
Ok(())
}