From ded14f0d199fa05edca2f8e975ced88e351baed3 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 22 May 2016 14:19:38 +0200 Subject: [PATCH] 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. --- evennia/web/webclient/static/webclient/js/evennia.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evennia/web/webclient/static/webclient/js/evennia.js b/evennia/web/webclient/static/webclient/js/evennia.js index f93dee4f52..e41493c49b 100644 --- a/evennia/web/webclient/static/webclient/js/evennia.js +++ b/evennia/web/webclient/static/webclient/js/evennia.js @@ -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) {