mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
Tweak ping args
This commit is contained in:
@@ -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});
|
||||||
|
Reference in New Issue
Block a user