ethcore/snapshot: fix double-lock in Service::feed_chunk (#289)

This commit is contained in:
Anonymous 2021-03-02 21:27:28 +08:00 committed by rakita
parent 0947261cf2
commit 7c9eed8d65
1 changed files with 1 additions and 1 deletions

View File

@ -766,7 +766,7 @@ impl Service {
| Err(Error(SnapshotErrorKind::Snapshot(SnapshotError::RestorationAborted), _)) => (),
Err(e) => {
warn!("Encountered error during snapshot restoration: {}", e);
*self.restoration.lock() = None;
*restoration = None;
*self.status.lock() = RestorationStatus::Failed;
let _ = fs::remove_dir_all(self.restoration_dir());
}