Merge branch 'master' into fix-update-database-3

This commit is contained in:
Aleksandr Statciuk 2021-12-14 10:46:52 +03:00 committed by GitHub
commit eb1b263481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -215,12 +215,12 @@ function parseStatus(error, prevStatus) {
if(!error && prevStatus.code === 'offline') return statuses['not_247']
if(!error) return statuses['online']
if (error) {
if (error.includes('timed out')) {
if (['not_247', 'geo_blocked'].includes(prevStatus.code)) {
return prevStatus
} else if (error.includes('timed out')) {
return statuses['timeout']
} else if (error.includes('403')) {
return statuses['geo_blocked']
} else if (['not_247', 'geo_blocked'].includes(prevStatus.code)) {
return prevStatus
}
return statuses['offline']
}