When 2 concurrent downloads are running the progress callback for each download will be called for progress from either download.
The if statement in the progress callback bellow should never be true.
const fileDownload = fs.downloadFile({
fromUrl,
toFile,
progress: progress => {
if (progress.jobId != fileDownload.jobId) {
console.log(
"jobId mismatch",
progress.jobId,
fileDownload.jobId
);
return;
}
This happens because the concurrent downloads all broadcast the same DownloadProgress event across the bridge.