Skip to content

Commit

Permalink
Return when already downloading a file
Browse files Browse the repository at this point in the history
  • Loading branch information
islathehut committed Jan 17, 2025
1 parent d999e6f commit 0f1a9eb
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 0f1a9eb

Please sign in to comment.