[#1855] Try to calculate the correct amount of written bytes to update the ChannelProgressiveFuture