IOChunkedTransfer: Don't write to the sink if there is data pending


There are already mechanisms in place to try to write more when the sink
has managed to flush data into the OS buffers, so we can pace ourselves
better.

This reduces the amount of copying we do since we no longer, needlessly,
copy data into the sink's (pending) write-buffer. This brings memory
usage for transferring a large payload down to a more expected range.

Task-number: QTBUG-125717
Pick-to: 6.8
Change-Id: I38460cb5fa143dddb00c964c4da7c4b62d9628c4
Reviewed-by: Mate Barany <mate.barany@qt.io>
commitb63114a3b1abc03c63ac735dbefa760c7b4ffea5
parent1e27b53dd5ee6d9e10cd508a6b83cb7b9b8c0e5f
authorMårten Nordheim <marten.nordheim@qt.io>
committerMårten Nordheim <marten.nordheim@qt.io>
commit timeThu, 12 Sep 2024 13:59:23 +0200