Update index.js

This commit is contained in:
freearhey 2019-10-29 12:32:05 +03:00
parent f892a44030
commit 644bec9f93
1 changed files with 1 additions and 6 deletions

View File

@ -44,14 +44,10 @@ async function test() {
await new Promise(resolve => {
const timeout = setTimeout(() => {
stats.failures++
writeToLog(country.url, `Timeout exceeded`, item.url)
resolve()
}, config.timeout * 1000)
ffmpeg(item.url, { timeout: config.timeout }).ffprobe((err) => {
ffmpeg(item.url).ffprobe((err) => {
if(err) {
const message = parseMessage(err, item.url)
@ -59,7 +55,6 @@ async function test() {
stats.failures++
writeToLog(country.url, message, item.url)
}
clearTimeout(timeout)