AP manageur V1.1 (Bêta)
This commit is contained in:
1 parent
b30639f4ac
commit
ef6961d756
2 files changed
+151
-140
No files matched your search
+5
-3
@@ -9704,13 +9704,15 @@ ${vpnBadgeTopo}
|
||||
const data = await response.json();
|
||||
if (!response.ok) throw Error(data.error || 'Action refusée');
|
||||
|
||||
for (let attempt = 0; attempt < 12; attempt++) {
|
||||
for (let attempt = 0; attempt < 25; attempt++) {
|
||||
await new Promise(resolve => setTimeout(resolve, 800));
|
||||
await load();
|
||||
try {
|
||||
await load();
|
||||
} catch (_) {}
|
||||
if (action === 'start' && status && status.active) break;
|
||||
if (action === 'stop' && status && !status.active) break;
|
||||
if (action === 'restart') {
|
||||
if (attempt >= 1 && status && status.active) break;
|
||||
if (attempt >= 2 && status && status.active) break;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user