Skip to content

Commit

Permalink
Return when already downloading a file (#2702)
Browse files Browse the repository at this point in the history
  • Loading branch information
islathehut authored Jan 17, 2025
1 parent d999e6f commit e811c00
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ export class IpfsFileManagerService extends EventEmitter {
_logger.info('Downloading file', fileMetadata.size)
if (this.files.get(fileMetadata.cid)) {
_logger.warn(`Download is already running for this CID`)
return
}

this.files.set(fileMetadata.cid, {
size: fileMetadata.size || 0,
downloadedBytes: 0,
Expand Down

0 comments on commit e811c00

Please sign in to comment.