Force set file length on stream
This commit is contained in:
parent
ea2dfd0500
commit
0ebd4aa128
2 changed files with 8 additions and 7 deletions
|
|
@ -343,8 +343,13 @@ impl ManagedTorrent {
|
|||
torrent: self,
|
||||
};
|
||||
if s.torrent.maybe_reconnect_needed_peers_for_file(file_id) {
|
||||
s.torrent
|
||||
.with_opened_file(file_id, |fd| fd.reopen(false))??;
|
||||
s.torrent.with_opened_file(file_id, |fd| {
|
||||
fd.reopen(false)?;
|
||||
fd.file
|
||||
.lock()
|
||||
.set_len(fd.len)
|
||||
.context("error setting file length")
|
||||
})??;
|
||||
}
|
||||
streams.streams.insert(
|
||||
s.stream_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue