Добавлены таймауты
This commit is contained in:
@@ -12,7 +12,8 @@ class FileDownloader {
|
|||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
headers: {
|
headers: {
|
||||||
'user-agent': userAgent
|
'user-agent': userAgent,
|
||||||
|
timeout: 300*1000,
|
||||||
},
|
},
|
||||||
responseType: 'stream',
|
responseType: 'stream',
|
||||||
};
|
};
|
||||||
@@ -67,7 +68,8 @@ class FileDownloader {
|
|||||||
async head(url) {
|
async head(url) {
|
||||||
const options = {
|
const options = {
|
||||||
headers: {
|
headers: {
|
||||||
'user-agent': userAgent
|
'user-agent': userAgent,
|
||||||
|
timeout: 10*1000,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user