1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-02 06:13:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

fix testurl

This commit is contained in:
sunnylqm
2024-11-13 19:57:44 +08:00
parent 21f2c3918e
commit c7b78f0d46
3 changed files with 24 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ import {
UpdateAvailableResult,
UpdateEventsListener,
} from './type';
import { assertRelease, logger, testUrls } from './utils';
import { assertRelease, logger, promiseAny, testUrls } from './utils';
export { setCustomEndpoints };
const {
version: v,
@@ -162,7 +162,7 @@ export async function checkUpdate(APPKEY: string) {
const backupEndpoints = await updateBackupEndpoints();
if (backupEndpoints) {
try {
resp = await Promise.race(
resp = await promiseAny(
backupEndpoints.map((endpoint) =>
fetch(getCheckUrl(APPKEY, endpoint), fetchPayload),
),