aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2020-05-16 18:05:27 -0500
committerGitHub <noreply@github.com>2020-05-16 18:05:27 -0500
commitcbbe270cab6a9d6a527271a1ebf23b6d232c6fae (patch)
tree3c714eb21cfcc49ee5534c0729bb9a257fd8b19c /webAO
parent45cfbb2063a9c8a1e2ef25fe636c8e00f392707d (diff)
Check online asynchronously
Diffstat (limited to 'webAO')
-rw-r--r--webAO/master.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/webAO/master.js b/webAO/master.js
index 5527ce5..e7b9174 100644
--- a/webAO/master.js
+++ b/webAO/master.js
@@ -147,11 +147,11 @@ function onMessage(e) {
+ `<a class="button" href="client.html?mode=watch&ip=${args[2]}:${args[3]}${asset}">Watch</a>`
+ `<a class="button" href="client.html?mode=join&ip=${args[2]}:${args[3]}${asset}">Join</a></li>`;
server_description[i] = args[1];
- if (lowMemory===false)
- checkOnline(i, `${args[2]}:${args[3]}`);
+ if (!lowMemory)
+ setTimeout(() => checkOnline(i, `${args[2]}:${args[3]}`), 0);
}
- if (lowMemory===false)
- checkOnline(-1, "127.0.0.1:50001");
+ if (!lowMemory)
+ setTimeout(() => checkOnline(-1, "127.0.0.1:50001"), 0);
masterserver.close();
}
else if (header === "servercheok") {
@@ -170,4 +170,4 @@ function onMessage(e) {
msChat.scrollTop = msChat.scrollHeight;
}
}
-} \ No newline at end of file
+}