From e111a5a3a11a5b251b8989cd406c2dbba9254e28 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 26 Aug 2021 15:51:37 +0200 Subject: Don't throw when there is no error --- server/helpers/webtorrent.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts index bea76a46f..813ebc236 100644 --- a/server/helpers/webtorrent.ts +++ b/server/helpers/webtorrent.ts @@ -67,7 +67,9 @@ async function downloadWebTorrentVideo (target: { magnetUri: string, torrentName pipeline( file.createReadStream(), writeStream, - err => rej(err) + err => { + if (err) rej(err) + } ) }) -- cgit v1.2.3