mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-26 22:56:52 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
86a8ec27f3
@ -87,11 +87,8 @@ exports.ping = async (hostname, size = 56) => {
|
|||||||
return await exports.pingAsync(hostname, false, size);
|
return await exports.pingAsync(hostname, false, size);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// If the host cannot be resolved, try again with ipv6
|
// If the host cannot be resolved, try again with ipv6
|
||||||
if (e.message.includes("service not known")) {
|
// As node-ping does not report a specific error for this, try again with ipv6 no matter what.
|
||||||
return await exports.pingAsync(hostname, true, size);
|
return await exports.pingAsync(hostname, true, size);
|
||||||
} else {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user