diff --git a/src/DownloadVideoURL.ts b/src/DownloadVideoURL.ts index 322eff3..37df745 100644 --- a/src/DownloadVideoURL.ts +++ b/src/DownloadVideoURL.ts @@ -62,6 +62,11 @@ export class DownloadVideoURL { } reject(e); }); + + this.#httpRequest.on('timeout', () => { + this.#httpRequest.destroy(); + reject(new Error(`Request to ${source} timed out`)); + }); } catch (e) { reject(e);