fix after rebase on remove-reopen
This commit is contained in:
parent
4a73739871
commit
5cac8ac02c
2 changed files with 5 additions and 9 deletions
|
|
@ -368,6 +368,10 @@ impl ChunkTracker {
|
||||||
self.hns = res;
|
self.hns = res;
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn get_selected_pieces(&self) -> &BF {
|
||||||
|
&self.selected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
||||||
|
|
@ -351,15 +351,7 @@ impl ManagedTorrent {
|
||||||
file_torrent_abs_offset: fd_offset,
|
file_torrent_abs_offset: fd_offset,
|
||||||
torrent: self,
|
torrent: self,
|
||||||
};
|
};
|
||||||
if s.torrent.maybe_reconnect_needed_peers_for_file(file_id) {
|
s.torrent.maybe_reconnect_needed_peers_for_file(file_id);
|
||||||
// TODO: get rid of reopening files, it's such a source of bugs and complexity
|
|
||||||
s.torrent.with_opened_files(|files| {
|
|
||||||
for file in files {
|
|
||||||
file.reopen(false)?;
|
|
||||||
}
|
|
||||||
Ok::<_, anyhow::Error>(())
|
|
||||||
})??;
|
|
||||||
}
|
|
||||||
streams.streams.insert(
|
streams.streams.insert(
|
||||||
s.stream_id,
|
s.stream_id,
|
||||||
StreamState {
|
StreamState {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue