- if (timeout) {
- timer = setTimeout(async () => {
- return safeWebtorrentDestroy(webtorrent, torrentId, file ? { directoryPath, filepath: file.path } : undefined, target.torrentName)
- .then(() => rej(new Error('Webtorrent download timeout.')))
- }, timeout)
- }
+ timer = setTimeout(async () => {
+ return safeWebtorrentDestroy(webtorrent, torrentId, file ? { directoryPath, filepath: file.path } : undefined, target.torrentName)
+ .then(() => rej(new Error('Webtorrent download timeout.')))
+ }, timeout)