react-native-update 9.2.4 → 9.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils.ts +6 -4
- package/package.json +1 -1
package/lib/utils.ts
CHANGED
|
@@ -64,10 +64,12 @@ export const testUrls = async (urls?: string[]) => {
|
|
|
64
64
|
if (!urls?.length) {
|
|
65
65
|
return null;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
try {
|
|
68
|
+
const ret = await promiseAny(urls.map(ping));
|
|
69
|
+
if (ret) {
|
|
70
|
+
return ret;
|
|
71
|
+
}
|
|
72
|
+
} catch {}
|
|
71
73
|
logger('all ping failed, use first url:', urls[0]);
|
|
72
74
|
return urls[0];
|
|
73
75
|
};
|