1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-29 20:43:09 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
sunnylqm
2025-04-07 15:05:07 +08:00
parent 350bfa0c89
commit 7a9f579327
2 changed files with 5 additions and 5 deletions

View File

@@ -49,16 +49,16 @@ const ping =
return url;
}
log('ping failed', url, status, statusText);
return null;
throw new Error('Ping failed');
})
.catch(e => {
pingFinished = true;
log('ping error', url, e);
return null;
throw e;
}),
new Promise(r =>
new Promise((_, reject) =>
setTimeout(() => {
r(null);
reject(new Error('Ping timeout'));
if (!pingFinished) {
log('ping timeout', url);
}