[core] fix fd sharing when splitting file chunk

(bug on master branch; never released)

fix fd sharing in chunkqueue_steal_partial_file_chunk()
This commit is contained in:
Glenn Strauss 2020-10-20 16:53:21 -04:00
parent 0f82722f5f
commit 8f7019adf0
1 changed files with 1 additions and 0 deletions

View File

@ -482,6 +482,7 @@ static void chunkqueue_steal_partial_file_chunk(chunkqueue * const restrict dest
if (c->file.fd >= 0) {
chunk * const d = dest->last;
if (c->file.refchg) {
d->file.fd = c->file.fd;
d->file.ref = c->file.ref;
d->file.refchg = c->file.refchg;
d->file.refchg(d->file.ref, 1);