Remove an instance of double-locking in the same scope

This commit is contained in:
Igor Katson 2023-11-19 23:04:13 +00:00
parent 2ebbc0a828
commit d6cef0952c
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -1287,11 +1287,11 @@ impl PeerHandler {
);
{
let mut g = self.state.lock_write("mark_piece_downloaded");
g.chunks.mark_piece_downloaded(chunk_info.piece_index);
self.state.peers.reset_peer_backoff(handle);
}
self.state.peers.reset_peer_backoff(handle);
debug!("piece={} successfully downloaded and verified", index);
if self.state.is_finished() {