mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 12:31:54 +08:00
Chore: update domain alive check [skip ci]
This commit is contained in:
@@ -44,13 +44,14 @@ const deadDomains: string[] = [];
|
||||
bar.setTotal(bar.getTotal() + 1);
|
||||
|
||||
return queue.add(
|
||||
() => isDomainAlive(domain, includeAllSubdomain).then((alive) => {
|
||||
() => isDomainAlive(domain).then(({ alive, registerableDomainAlive, registerableDomain }) => {
|
||||
bar.increment();
|
||||
|
||||
if (alive) {
|
||||
return;
|
||||
if (!registerableDomainAlive) {
|
||||
deadDomains.push('.' + registerableDomain);
|
||||
} else if (!alive) {
|
||||
deadDomains.push(includeAllSubdomain ? '.' + domain : domain);
|
||||
}
|
||||
deadDomains.push(includeAllSubdomain ? '.' + domain : domain);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user