mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
fix: 框架启动概率性失败
修复框架启动有概率失败的问题
This commit is contained in:
parent
f61321d5a6
commit
9d92270931
@ -107,7 +107,13 @@ function registerInitCallback(callback) {
|
||||
|
||||
async function fetchServices(timeout = 10000) {
|
||||
return Promise.race([
|
||||
pollForNTInitializationCheck(),
|
||||
new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
pollForNTInitializationCheck().then(() => {
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
}),
|
||||
new Promise((resolve) => {
|
||||
setTimeout(() => resolve(false), timeout);
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user