Made the idle call from the ajax webclient more precise. Not sure if this

actually resolves the issue of the idle command not being properly
parsed by the ajax client or not - the error is that only the string
'idle' is sent, which is then split into its components and not
recognized as an input command. The error seems hard to reliably
reproduce.
This commit is contained in:
Griatch 2016-05-22 14:19:38 +02:00
parent d48125c019
commit ded14f0d19

View file

@ -324,6 +324,7 @@ An "emitter" object must have a function
// Send Client -> Evennia. Called by Evennia.msg
var msg = function(data, inmode) {
log("ajax.msg:", data, JSON.stringify(data));
$.ajax({type: "POST", url: "/webclientdata",
async: true, cache: false, timeout: 30000,
dataType: "json",
@ -371,7 +372,7 @@ An "emitter" object must have a function
else {
// We'd expect to see a keepalive message rather than
// a timeout. Ping the server to see if it's still there.
msg("idle");
msg("idle", "input");
}
if (stop_polling) {