--- connections.c 2017-08-28 01:52:33.000000000 +0200 +++ connections_new.c 2017-08-28 01:52:45.000000000 +0200 @@ -1061,7 +1061,7 @@ dst_cq->last->offset == 0) { /* ok, take the last chunk for our job */ - if (dst_cq->last->file.length < 1 * 1024 * 1024) { + if (toRead + dst_cq->last->file.length < 1 * 1024 * 1024) { dst_c = dst_cq->last; if (dst_c->file.fd == -1) {