mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 支持配置网络连通性判断 URL https://github.com/siyuan-note/siyuan/issues/7805
This commit is contained in:
parent
42dc3712c1
commit
bec14bf7db
1 changed files with 6 additions and 1 deletions
|
|
@ -954,7 +954,12 @@ powerMonitor.on("resume", async () => {
|
|||
const result = await fetch("https://icanhazip.com", {timeout: 1000});
|
||||
return 200 === result.status;
|
||||
} catch (e) {
|
||||
return false;
|
||||
try {
|
||||
const result = await fetch("https://api.ipify.org", {timeout: 1000});
|
||||
return 200 === result.status;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue