mirror of
https://github.com/evennia/evennia.git
synced 2026-03-25 01:06:32 +01:00
Made an "idle" command to be sent from the webclient to the server every 3 minutes to avoid conservative reverse proxies resetting connections on us. This should fix issue 129.
This commit is contained in:
parent
ef59b97881
commit
46ca685c76
1 changed files with 8 additions and 3 deletions
|
|
@ -65,10 +65,10 @@ function webclient_receive(){
|
|||
});
|
||||
};
|
||||
|
||||
function webclient_input(){
|
||||
function webclient_input(arg){
|
||||
// Send an input from the player to the server
|
||||
|
||||
var outmsg = $("#inputfield").val(); // get data from form
|
||||
|
||||
var outmsg = typeof(arg) != 'undefined' ? arg : $("#inputfield").val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
|
|
@ -229,6 +229,7 @@ function webclient_set_sizes() {
|
|||
//$("#inputfield").css({'width': win_w - inp_w - 20});
|
||||
}
|
||||
|
||||
|
||||
// Callback function - called when page has finished loading (gets things going)
|
||||
$(document).ready(function(){
|
||||
// remove the "no javascript" warning, since we obviously have javascript
|
||||
|
|
@ -239,6 +240,10 @@ $(document).ready(function(){
|
|||
setTimeout(function () {
|
||||
webclient_init();
|
||||
}, 500);
|
||||
// set an idle timer to avoid proxy servers to time out on us (every 3 minutes)
|
||||
setInterval(function() {
|
||||
webclient_input("idle");
|
||||
}, 60000*3);
|
||||
});
|
||||
|
||||
// Callback function - called when the browser window resizes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue