1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-16 09:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Tweak ping args

This commit is contained in:
sunnylqm
2020-03-08 08:59:42 +08:00
parent 552db6d2b3
commit 27f640f305

View File

@@ -108,11 +108,11 @@ async function uploadFile(fn) {
if (backupUrl) { if (backupUrl) {
const pingResult = await tcpPing({ const pingResult = await tcpPing({
address: url.replace('https://', ''), address: url.replace('https://', ''),
attempts: 3, attempts: 4,
timeout: 3000, timeout: 1000,
}); });
// console.log({pingResult}); // console.log({pingResult});
if (pingResult.avg > 100) { if (pingResult.avg > 150) {
realUrl = backupUrl; realUrl = backupUrl;
} }
// console.log({realUrl}); // console.log({realUrl});