[Updater > Module] Further minor source cleanup

This commit is contained in:
Ducko 2022-03-23 10:58:33 +00:00
parent ac97a3863e
commit babf473559
2 changed files with 2 additions and 4 deletions

View file

@ -152,8 +152,7 @@ const checkModules = async () => {
qs: {
...baseQuery,
_: Math.floor(Date.now() / 300000) // 5 min intervals
},
timeout: 15000
}
});
checking = false;
@ -223,7 +222,6 @@ const downloadModule = async (name, ver) => {
const resp = await request.get({
url,
qs: baseQuery,
timeout: 15000,
stream
});

View file

@ -3,7 +3,7 @@ const request = require('request');
const nodeRequest = (opts) => new Promise((resolve, reject) => {
const { stream, timeout } = opts;
const req = request({ ...opts, timeout: timeout ?? 30000 });
const req = request({ ...opts, timeout: timeout ?? 15000 });
req.on('response', (response) => {
const total = parseInt(response.headers['content-length'] || 1, 10);