mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 08:41:37 +08:00
cleanup
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
11
src/utils.ts
11
src/utils.ts
@@ -77,10 +77,13 @@ export const testUrls = async (urls?: string[]) => {
|
|||||||
if (!urls?.length) {
|
if (!urls?.length) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const ret = await promiseAny(urls.map(ping));
|
|
||||||
if (ret) {
|
try {
|
||||||
return ret;
|
const ret = await promiseAny(urls.map(ping));
|
||||||
}
|
if (ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
} catch {}
|
||||||
log('all ping failed, use first url:', urls[0]);
|
log('all ping failed, use first url:', urls[0]);
|
||||||
return urls[0];
|
return urls[0];
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user